title: Cannot import packages installed in new Conda environment
body: <p>I am trying to make my own conda python environment on HPC server, and something very strange is happening.</p>
  <p><strong>The problem</strong></p>
  <p>After creating a new conda environment, it appears that python is not seeing itself in this environment, and using the base environment... Thus I cannot use packages installed in the new environment, but I can see the ones in the base environment...</p>
  <p><strong>Here is what I did</strong></p>
  <p>I install my environment as follows:</p>
  <pre><code>$ conda create -n niml pip python=3.6.5
  $ source activate niml
  (niml) $ conda install -c conda-forge luigi
  </code></pre>
  <p>and then I check my installed packages:</p>
  <pre><code>(niml) $ conda list
  </code></pre>
  <p>and here is what I get, very basic environment:</p>
  <pre><code># Name                    Version                   Build  Channel
  botocore                  1.10.61                    py_0    conda-forge
  ca-certificates           2018.4.16                     0    conda-forge
  certifi                   2018.4.16                py36_0    conda-forge
  docutils                  0.14                     py36_0    conda-forge
  jmespath                  0.9.3                      py_1    conda-forge
  libedit                   3.1.20170329         h6b74fdf_2
  libffi                    3.2.1                hd88cf55_4
  libgcc-ng                 7.2.0                hdf63c60_3
  libstdcxx-ng              7.2.0                hdf63c60_3
  lockfile                  0.12.2                     py_1    conda-forge
  luigi                     2.7.6                    py36_0    conda-forge
  ncurses                   6.1                  hf484d3e_0
  openssl                   1.0.2o                        0    conda-forge
  pip                       10.0.1                   py36_0
  pyparsing                 2.2.0                      py_1    conda-forge
  python                    3.6.5                hc3d631a_2
  python-daemon             2.1.2                    py36_0
  python-dateutil           2.7.3                      py_0    conda-forge
  readline                  7.0                  ha6073c6_4
  setuptools                39.2.0                   py36_0
  six                       1.11.0                   py36_1    conda-forge
  sqlite                    3.24.0               h84994c4_0
  tk                        8.6.7                hc745277_3
  tornado                   4.5.3                    py36_0    conda-forge
  wheel                     0.31.1                   py36_0
  xz                        5.2.4                h14c3975_4
  zlib                      1.2.11               ha838bed_2
  </code></pre>
  <p>then I try running python and import the package which I installed <code>luigi</code>, and it does not find it which results in the following error.</p>
  <pre><code>(niml) $ python
  
  &gt;&gt;&gt; import luigi
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'luigi'
  </code></pre>
  <p>I also tried to import <code>numpy</code> which is in the base environment and NOT in the new environment, and it works.</p>
  <pre><code>&gt;&gt;&gt; import numpy
  </code></pre>
  <p>The above works, which means <code>python</code> thinks it is running in the base environment.</p>
  <p><strong>Python in my own environment is being run</strong></p>
  <p>I checked which python is being executed, and it is indeed the one in the new environment <code>niml</code>:</p>
  <pre><code>&gt;&gt;&gt; import sys
  &gt;&gt;&gt; sys.executable
  
  '~/.conda/envs/niml/bin/python'
  </code></pre>
  <p>Also checked from the command line, and it is the <code>python</code> executable within the environment:</p>
  <pre><code>(niml) $ which python
  
  ~/.conda/envs/niml/bin/python
  </code></pre>
  <p><strong>I am running on HPC</strong></p>
  <p>I have created anaconda environments hundreds of times before and never had this problem. Only difference is that I am using an HPC server, and thus I had to make something like this:</p>
  <pre><code>module load python/anaconda3
  </code></pre>
  <p>this is the only difference I see from my usual workflow which might be creating this problem...</p>
  <p>Anyone else has seen this problem before and was able to solve it??</p>