This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Build FEniCS python components with UCS4 support.

0 votes

I've installed FEniCS from source on my Debian machine, and i now wish to use Scipy in my FEniCS scripts. Adding the path to my local python installation to fenics.stable as answered here makes it possible to import modules such as Scipy.

Unfortunately, when invoking some functions such as sparse solve, i get an error

ImportError:
/usr/lib/python2.7/dist-packages/scipy/sparse/linalg/dsolve/_superlu.so:
undefined symbol: PyUnicodeUCS4_AsASCIIString

The issue appears to be that my local python installation was build using USC4, where as the python components installed with FEniCS only works with USC2.

Is it possible to somehow modify the fenics-install.sh file so to build the python components needed with USC4 enabled?

If not, has anyone been successful at running Scipy + FEniCS on debian, how is it done?

asked Mar 24, 2015 by ASN FEniCS Novice (630 points)

1 Answer

+2 votes
 
Best answer

Rather than modify fenics-install.sh so to make it work with the scipy package on my local python installation, I build scipy from source into the $HOME/.hashdist/bld/profile/$PROFILE/ directory using the python interpreter invoked by source fenics.stable. This worked right away, and i guess it may be the best approach for other packages also in case of unicode conflicts.

answered Mar 25, 2015 by ASN FEniCS Novice (630 points)
...