[firedrake] Locally installed FFC not found on ARCHER

Florian Rathgeber florian.rathgeber at imperial.ac.uk
Thu Jan 29 12:02:41 GMT 2015


On 29/01/15 11:47, David Ham wrote:
> 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?

It does happen for all packages using setup from setuptools. I *think*
FFC requires some features from setuptools, so it might not be easily
possible to switch to a plain distutils setup. You could try, but I
won't have time to do that unfortunately.

For now I have changed the fdrake-python-env module to point to the
source. That means it's now required to do a `python setup.py build_ext
-i` whenever updating the fdrake FFC.

Florian

> On 29 January 2015 at 11:43, Rathgeber, Florian
> <florian.rathgeber at imperial.ac.uk
> <mailto:florian.rathgeber at 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/li
b
>     /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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2980 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20150129/cdea5e4f/attachment.p7s>


More information about the firedrake mailing list