title: Module installed with PIP in virtualenv not found
body: <p>Getting a very strange error. I am making a virtual environment and initializing it with a pip requirements.txt file, but when I go to run code in the activated environment, the virtual environment interpreter claims to be missing some (and only some) of the modules:</p>
  
  <pre><code>(venv) $ pip list
  certifi (2017.7.27.1)
  chardet (3.0.4)
  decorator (4.1.2)
  idna (2.5)
  ipython (6.1.0)
  ipython-genutils (0.2.0)
  jedi (0.10.2)
  numpy (1.13.1)
  olefile (0.44)
  pexpect (4.2.1)
  pickleshare (0.7.4)
  Pillow (4.2.1)
  pip (9.0.1)
  prompt-toolkit (1.0.15)
  protobuf (3.3.0)
  ptyprocess (0.5.2)
  Pygments (2.2.0)
  PyYAML (3.12)
  pyzmq (16.0.2)
  requests (2.18.3)
  scipy (0.19.1)
  setuptools (38.5.1)
  simplegeneric (0.8.1)
  six (1.10.0)
  torch (0.2.0.post3)
  torchvision (0.2.0)
  tornado (4.5.1)
  tqdm (4.15.0)
  traitlets (4.3.2)
  urllib3 (1.22)
  visdom (0.1.5)
  wcwidth (0.1.7)
  wheel (0.30.0)
  </code></pre>
  
  <p>So I double check:</p>
  
  <pre><code>(venv) $ pip install tqdm 
  Requirement already satisfied: tqdm in ./venv/lib/python3.6/site-packages
  (venv) $ python  
  Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49) 
  [GCC 7.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; from tqdm import tqdm
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'tqdm'
  </code></pre>
  
  <p>people have suggested <a href="https://stackoverflow.com/questions/32004958/python-module-not-found-in-virtualenv">forcing a reinstall</a>, using a different interpreter source, and just reinstalling. None of these have worked. this is very mysterious. Have any of you seen anything like this? Saw a similar unresolved problem <a href="https://www.pythonanywhere.com/forums/topic/1107/" rel="nofollow noreferrer">here</a></p>
  
  <p>UPDATE: Fixed. H/T to @Riverman for helping my find the issue: the problem was that an old unused alias was left over from a while ago, and while pip still had it own point back to python3.6, the python command itself was aliased to some old Anaconda3 version I had lying around somewhere. Alias, I forgot, do not go away by just re-sourcing your .bashrc file, so I ran <code>unalias</code> with the offending python command and it worked!</p>
  
  <p>Would still love to hear from people though if they could explain <em>why</em> this can occur, though. I though venv completely insulated you from the outside environment...is it because aliasing is a system level effect so it seeps into the venv??</p>