Can we change the way FFC uses setuptools so this doesn't happen? I mean the easy_install faff doesn't occur for all python packages, right? On 29 January 2015 at 11:43, Rathgeber, Florian < florian.rathgeber@imperial.ac.uk> wrote:
Eike, I have fixed this, so you should be able to remove your hack.
For reference: the problem is the following file: /work/y07/y07/fdrake/ffc/lib/python2.7/site-packages/easy-install.pth
This file is (re)created *every time* the FFC installation is updated since FFC uses the setuptools egg installation. Due to a setuptools "feature" all the eggs contained in this file are *prepended* to sys.path and end up *before* anything in PYTHONPATH and there is *nothing* you can do to prevent this. The only fix is to edit this .pth file and remove or comment the offending lines (first and last).
What we might be able to do is not actually install FFC but point the module at the source try and build the extension modules in place. Thoughts?
On 29/01/15 11:25, Eike Mueller wrote:
Hi Lawrence,
ok, adding
import sys
sys.path.remove('/work/y07/y07/fdrake/ffc/lib/python2.7/site-packages/FFC-1.4.0_-py2.7-linux-x86_64.egg')
at the top of firedrake/__init__.py seems to fix it for me.
Thanks,
Eike
On 29/01/15 10:37, Lawrence Mitchell wrote: On 29/01/15 10:23, Eike Mueller wrote:
Dear firedrakers,
I need to install my own version of FFC, since the one already installed in /work/y07/y07/fdrake appears not to be compatible with the firedrake version I use:
RuntimeError: Incompatible Firedrake version 0.12.0 and FFC version unknown.
So I installed FFC locally and added it to PYTHONPATH:
/work/n02/n02/eike//git_workspace//firedrake-helmholtzsolver/source:/work/n02/n02/eike//git_workspace//firedrake-bench:/work/n02/n02/eike//git_workspace//pybench:/work/n02/n02/eike//git_workspace//firedrake:/work/n02/n02/eike//git_workspace//PyOP2:/work/n02/n02/eike//git_workspace//petsc4py/cray-gnu-shared/lib/python2.7/site-packages/:/work/n02/n02/eike//git_workspace//COFFEE/build/lib:/work/n02/n02/eike//git_workspace//ffc/build/lib.linux-x86_64-2.7/:/work/n02/n02/eike//Library:/work/y07/y07/fdrake/ufl/lib/python2.7/site-packages:/work/y07/y07/fdrake/scientificpython/lib/python2.7/site-packages:/work/y07/y07/fdrake/psutil/lib/python2.7/site-packages:/work/y07/y07/fdrake/mpi4py/lib/python2.7/site-packages:/work/y07/y07/fdrake/instant/lib/python2.7/site-packages:/work/y07/y07/fdrake/fiat/lib/python2.7/site-packages:/work/y07/y07/fdrake/ffc/lib/python2.7/site-packages:/work/y07/y07/fdrake/decorator-3.4.0/lib/python2.7/site-packages:/work/y07/y07/fdrake/petsc/arch-linux2-cxx-opt/lib /p
y th
on2.7/site-packages:/work/y07/y07/cse/anaconda/1.9.2/lib/python2.7/site-packages:/work/y07/y07/cse/anaconda/1.9.2/lib/python2.7:/usr/local/packages/cse/bolt/0.6/modules
However, in python, the /work/y07/y07/fdrake version comes *first*, so it always picked up when I import ffc and I keep getting the error message above:
This looks like the standard easy_install disaster. I never know how to fix this unfortunately.
Lawrence
-- Dr David Ham Departments of Mathematics and Computing Imperial College London http://www.imperial.ac.uk/people/david.ham