Hi Florian,
I think I now know what is going on: if I run the script with
eikemueller@138-38-188-207 $ ./scripts/firedrake-clean
it picks up a different python version than if I use
eikemueller@138-38-188-207 $ python ./scripts/firedrake-clean
I get 2.7.3 in the first case but 2.7.8 in the latter. 2.7.3 is an old Canopy python installation, and the link in my /usr/local/bin points to this.
However, ‘python’ is aliased to the (correct) version 2.7.8 which I get when I explicitly invoke python:
eikemueller@138-38-188-207 $ python
Python 2.7.8 (default, Jul 13 2014, 17:11:32)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
The confusing thing is that ‘which’ tells me that he version in /usr/local/bin seems to be the version which is used, but it is not due the alias:
eikemueller@138-38-188-207 $ which python
/usr/local/bin/python
eikemueller@138-38-188-207 $ type -a python
python is aliased to `/opt/local/bin/python2.7'
python is /usr/local/bin/python
python is /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /usr/local/bin/python
python is /usr/bin/python
Apparently env (which is used in the firedrake-clean script to invoke python via "#!/usr/bin/env python") uses the first version it finds in PATH, which is set to:
/usr/local/openmpi-.8.1/bin/:/usr/local/bin:/Applications/LyX.app/Contents/MacOS/:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/:/Users/eikemueller/PostDocBath/EllipticSolvers/petsc/arch-darwin-c-opt/bin:/Users/eikemueller/Tools/fcm-2014.06.0/bin/:/Users/eikemueller/Tools/fcm-2014.06.0/lib/FCM/:/usr/local/Dune2.2.1/bin/:/opt/pkgconfig/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/eikemueller/Library/bin
so it picks up the (wrong) version in /usr/local/bin.
Anyway, I now simply deleted the symlink in /usr/local/bin and then it all works again.
All this confusion must have come from my recent upgrade to Yosemite (which I still regret…).
Thanks again for your help,
Eike
--
Dr Eike Hermann Mueller
Research Associate (PostDoc)
Department of Mathematical Sciences
University of Bath
Bath BA2 7AY, United Kingdom
+44 1225 38 5803
e.mueller@bath.ac.ukhttp://people.bath.ac.uk/em459/
On 14/11/14 08:40, Eike Mueller wrote:
Hi Florian,
This means that at some point you have built NumPy 1.9 as a dependency
for either PyOP2, Firedrake or petsc4py and the built petsc4py against
NumPy 1.9. However now you seem to be using the system NumPy 1.7.
Remove NumPy 1.9 and rebuild petsc4py.
how can I delete numpy 1.9, or even find out where it is installed?
It'll be installed in the same prefix location as whatever package it
was installed as a dependency for. I usually type `pydoc numpy` to find
out which NumPy is picked up and from where.
Strangely, I seem to have 1.8.0 installed:
eikemueller@138-38-188-207 $ python
Python 2.7.8 (default, Jul 13 2014, 17:11:32)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy
print numpy.__version__
1.8.0
Hmm, that's odd. Where is this coming from? Is this the system installed
one? It *might* also be your version of Cython that plays a role because
I *think* numpy.pxd comes with Cython.
Also, why does it only crash in the firedrake-clean script, but works
without any problems when I load firedrake or petsc4py?
I suspect there must be a difference in PYTHONPATH for the environment
you run firedrake in and execute the firedrake-clean script?
Florian
Thanks,
Eike
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/firedrake