Yes David, I did mean firedrake/lib/python2.7/site-packages. Sorry about my typo. Below I tried it again. You can see that I did active the virtualenv. You can also see my paths and that unfortunately the above path is not there. There are a lot of other paths but not the one that has a few of these modules. Francis-Poulins-MacBook-Pro:software fpoulin$ source firedrake/bin/activate (firedrake)Francis-Poulins-MacBook-Pro:software fpoulin$ python Python 2.7.11 (default, Jan 22 2016, 08:28:37) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sys
sys.path
['', '/usr/local/lib/python2.7/site-packages/cbcdns-1.0.0-py2.7.egg', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users/fpoulin/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages/distarray-0.6.0_dev-py2.7.egg', '/Library/Python/2.7/site-packages/numpy-1.9.2-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages']
import petsc4py
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named petsc4py When I am in virtualenv and I use sys.path does help. It finds petsc4py but not firedrake, because it can't find h5py.
sys.path.append("/Users/fpoulin/software/firedrake/lib/python2.7/site-packages")
import petsc4py
import firedrake
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/firedrake/__init__.py", line 33, in <module> from firedrake.checkpointing import * File "/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/firedrake/checkpointing.py", line 4, in <module> from firedrake import hdf5interface as h5i File "firedrake/hdf5interface.pyx", line 1, in init firedrake.hdf5interface (firedrake/hdf5interface.c:2016) ImportError: No module named h5py I see that the following was installed. /Users/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg/ I agree that there is something odd here in my installation in regards to the path. Any advice would be greatly appreciated. Francis