Hello everyone--
Here's my sad tale. Any help would be much much appreciated!
Thank you!
I. Make sure you are in the same conda environment as your package
(cft) stoat ~ » python -c "import sys; print(sys.prefix)"
/home/matsen/anaconda2/envs/cft
II. For Python packages, make sure you have not set the PYTHONPATH or PYTHONHOME variable
(cft) stoat ~ » conda info -a | grep PYTHON
PYTHONHOME: <not set>
PYTHONPATH: <not set>
III. For Python packages, remove any site-specific directories
(cft) stoat ~ » tree ~/.local
/home/matsen/.local
└── share
└── autojump
├── autojump_errors
├── autojump.txt
└── autojump.txt.bak
2 directories, 3 files
but perhaps more importantly:
(cft) stoat ~ » python -c "import sys; print(sys.path)" | sed "s/ /\n/g"
['',
'/home/matsen/anaconda2/envs/cft/lib/python27.zip',
'/home/matsen/anaconda2/envs/cft/lib/python2.7',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/plat-linux2',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/lib-tk',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/lib-old',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/lib-dynload',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/site-packages',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/site-packages/DendroPy-4.2.0-py2.7.egg',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/site-packages/ete3-3.0.0b36-py3.5.egg',
'/home/matsen/anaconda2/envs/cft/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg']
IV. For C libraries, unset the environment variables LD_LIBRARY_PATH on Linux
Not that this should matter in my case, but for good measure:
(cft) stoat ~ » conda info -a | grep LD
LD_LIBRARY_PATH: <not set>
V. Occasionally, an installed package will become corrupted
(cft) stoat ~ » conda install -f graphviz 1 ↵
Fetching package metadata .........
Solving package specifications: .
Package plan for installation in environment /home/matsen/anaconda2/envs/cft:
The following NEW packages will be INSTALLED:
graphviz: 2.38.0-5
Proceed ([y]/n)? y
And yet still...
(cft) stoat ~ » python -c "import graphviz"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named graphviz
Now, for the kicker
I poked around in site-packages and didn't see graphviz there. So I pip installed it, it showed up, and now I can import it. On the other hand, another package biopython (which I installed with conda) is there, but I can't import it. But for the final very confusing thing:
(cft) stoat python2.7/site-packages » pip install biopython 1 ↵
Requirement already satisfied: biopython in /home/matsen/anaconda2/envs/cft/lib/python2.7/site-packages