Thanks Lawrence. Below are my results. ** regular ** Francis-Poulins-MacBook-Pro:~ fpoulin$ which python Francis-Poulins-MacBook-Pro:~ fpoulin$ python -c "import sys; print sys.executable; print sys.path" /usr/local/opt/python/bin/python2.7 ['', '/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', '/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'] ** virtualenv ** Francis-Poulins-MacBook-Pro:~ fpoulin$ cd ~/software/ Francis-Poulins-MacBook-Pro:software fpoulin$ source firedrake/bin/activate (firedrake)Francis-Poulins-MacBook-Pro:software fpoulin$ which python /Users/fpoulin/software/firedrake/bin/python (firedrake)Francis-Poulins-MacBook-Pro:software fpoulin$ python -c "import sys; print sys.executable; print sys.path" /usr/local/opt/python/bin/python2.7 ['', '/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'] Sadly, there is no firedrake in my path at all. I guess that explains why it can't find anything but it's strange that it wasn't added. Thanks, Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Friday, February 05, 2016 7:39 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] upgrading firedrake (problem found!)
On 5 Feb 2016, at 12:07, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
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.
OK, so *before* you activate the virtualenv, what do we have for: $ which python $ python -c "import sys; print sys.executable; print sys.path" I see something like: /usr/local/opt/python/bin/python2.7 ['', '/usr/local/lib/python2.7/site-packages/networkx-1.9.1-py2.7.egg', '/usr/local/lib/python2.7/site-packages/sphinxcontrib_youtube-1.0dev_20150105-py2.7.egg', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users/lmitche1/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packages', '/usr/local/Cellar/numpy/1.10.1/libexec/nose/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/gtk-2.0', '/Library/Python/2.7/site-packages']
Francis-Poulins-MacBook-Pro:software fpoulin$ source firedrake/bin/activate (firedrake)Francis-Poulins-MacBook-Pro:software fpoulin$ python
Now we've activated the virtualenv, so let's try again: $ which python $ python -c "import sys; print sys.executable; print sys.path" I hope these are different to before activation. If they are not, we need to figure out why.
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")
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/
If everything is working well, then this /directory/ should have been added to python path. For example, in my case, in an activated virtualenv, I have: python -c "import sys; print sys.executable; print sys.path" /Users/lmitche1/tmp/firedrake/bin/python ['', '/Users/lmitche1/tmp/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg', '/Users/lmitche1/tmp/firedrake/lib/python27.zip', '/Users/lmitche1/tmp/firedrake/lib/python2.7', '/Users/lmitche1/tmp/firedrake/lib/python2.7/plat-darwin', '/Users/lmitche1/tmp/firedrake/lib/python2.7/plat-mac', '/Users/lmitche1/tmp/firedrake/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/lmitche1/tmp/firedrake/lib/python2.7/lib-tk', '/Users/lmitche1/tmp/firedrake/lib/python2.7/lib-old', '/Users/lmitche1/tmp/firedrake/lib/python2.7/lib-dynload', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/lmitche1/tmp/firedrake/lib/python2.7/site-packages'] Thanks, Lawrence