On Fri, 5 Feb 2016 at 03:29 Francis Poulin <fpoulin@uwaterloo.ca> wrote:

I have set my default python and ipython to my homebrew version.  (don't think this did much)  I reinstalled firedrake and found the following:

-> on ubuntu firedrake, petsc4py, mpi4py are all located in "firedrake/local/lib/python2.7/site-packages".

On my mac the local folder does not exist.

-> I see that these are all located in the following, which is not in my path.

firedrake/lib/python2.7/site-packages/petsc4py

I think you mean here that all the python packages are installed under firedrake/lib/python2.7/site-packages

This is correct. It's just a minor difference in where virtualenv installs packages on Ubuntu and on Mac. 

Activating the virtualenv will put the appropriate site-packages in your path.  Are you sure that the directory is not in sys.path after activating the virtualenv with:

source firedrake/bin/activate

?
 

When I open python and append to my path

sys.path.append("/Users/fpoulin/software/firedrake/lib/python2.7/site-packages")

then I can import petsc4py, mpi4py, but firedrake cannot be imported because of h5py.  I am going to redo this now including all the options in PETSC and wonder if that will fix this problem.

just adding sys.path is very unlikely to work. You really need to activate the virtualenv in order to properly access all the things which the install script installs.
 

>>> 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

But it seems to me that maybe there is a problem with the paths set up on my mac, and maybe other macs as well?

I think it's just activating the virtualenv. Firedrake currently runs fine on our Macs and on the Macs at travis-ci (the online build test service we use).
 
Regards,

David




_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake