astrojuanlu / fenics-recipes

This repository contains conda recipes for the FEniCS libraries
The Unlicense
13 stars 15 forks source link

Could not find some dependencies for fenics: eigen3 #1

Closed porphyrius closed 9 years ago

porphyrius commented 9 years ago

Hi Juanlu,

Thank you for the fenics recipe.

I tried to install fenics on Ubuntu 14.10 with: conda install fenics --channel juanlu001 and I get Error: Could not find some dependencies for fenics: eigen3

Do you have any suggestion?

Andrea

astrojuanlu commented 9 years ago

Hello @porphyrius! Thanks for your comment, I will look into this promptly.

porphyrius commented 9 years ago

Hi Juanlu!

I did a new tentative:

conda install eigen3 --channel juanlu001

and got:

Error: No packages found in current linux-64 channels matching: eigen3

porphyrius commented 9 years ago

I also noticed that here:

https://binstar.org/Juanlu001/eigen3

a warning is issued:

Warning: This package does not contain any files in the main channel. Contact the package admin for developer install instructions.

astrojuanlu commented 9 years ago

I re-uploaded eigen3 to the main channel, would you please try again to see if that solved the issue?

porphyrius commented 9 years ago

Hi Juanlu, thanks a lot!

Now the install goes fine.

However dolfin does not work, the problem I get is:

Python 2.7.9 |Anaconda 2.1.0 (64-bit)| (default, Dec 15 2014, 10:33:51) 
Type "copyright", "credits" or "license" for more information.
IPython 2.2.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
In [1]: from dolfin import *
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
 in ()
----> 1 from dolfin import *
/home/andrea/anaconda/lib/python2.7/site-packages/dolfin/__init__.pyc in ()
     14 
     15 # Import names from the compiled cpp modules
---> 16 from . import cpp
     17 from dolfin.cpp import *
     18 from dolfin.cpp import __version__, __swigversion__, __pythonversion__
/home/andrea/anaconda/lib/python2.7/site-packages/dolfin/cpp/__init__.py in ()
     40 
     41     # Import the module
---> 42     exec("from . import %s" % module_name)
     43     module = globals()[module_name]
     44 
 in ()
/home/andrea/anaconda/lib/python2.7/site-packages/dolfin/cpp/common.py in ()
     30                 fp.close()
     31             return _mod
---> 32     _common = swig_import_helper()
     33     del swig_import_helper
     34 else:
/home/andrea/anaconda/lib/python2.7/site-packages/dolfin/cpp/common.py in swig_import_helper()
     26         if fp is not None:
     27             try:
---> 28                 _mod = imp.load_module('_common', fp, pathname, description)
     29             finally:
     30                 fp.close()
ImportError: libcppunit-1.13.so.0: cannot open shared object file: No such file or directory

Any idea?

astrojuanlu commented 9 years ago

Hello @porphyrius, sorry for the late reply. What happens if you apt-get install libcppunit-1.13?

astrojuanlu commented 9 years ago

I didn't expect that requirement though, so there must be some issue in my build environment. I will have to check this.

porphyrius commented 9 years ago

Thank you @Juanlu001, now importing dolfin works.

However I immediately get into a new problem:

IPython 2.2.0 -- An enhanced Interactive Python.

from dolfin import *
mesh = UnitSquareMesh(6, 4)
V = FunctionSpace(mesh, "Lagrange", 1)

/home/andrea/anaconda/lib/python2.7/site-packages/ufl/log.pyc in error(self, *message)
149         "Write error message and raise an exception."
150         self._log.error(*message)
--> 151         raise self._exception_type(self._format_raw(*message))
152 
153     def begin(self, *message):

Exception: Incompatible swig versions detected. UFC swig version is not the same as extension module swig version: '3.0.2' != '2.0.12' 

I must say that I have now two parallel python environments, one installed with apt-get, and one installed with Anaconda. I switch to the Anaconda environment with

export PATH="/home/andrea/anaconda/bin:$PATH"
export PYTHONPATH="$PYTHONPATH:$HOME/:$HOME/bin/:$HOME/PyDSTool/:$HOME/PyDSTool/tests/:$HOME/anaconda/"

In the "normal" Ubuntu environment I have swig 2.0.12.

In the Anaconda environment I have swig 3.0.2.

So apparently fenics in the Anaconda environment is seeing the wrong swig. Is it perhaps because libcppunit-1.13 had to be also installed with Anaconda?

astrojuanlu commented 9 years ago

Okay, we are making progress. First of all, you should try not to manually switch to the Anaconda environment: please try these:

$ conda create -n fenics27 python=2.7 ipython=2.2
$ source activate fenics27
(fenics27) $ conda install fenics --channel juanlu001

The source activate step is key, because it properly configures all the paths. This way we ensure nothing strange happens.

porphyrius commented 9 years ago

Oh sorry you are right!

I missed those steps, that was the source of all of the problems!

Now everything works perfectly.

Thank you so much for your help.

astrojuanlu commented 9 years ago

Great! :smile: As a last check, would you please try removing libcppunit to see if the package still works without it? If it does, I will definitely close this issue.

porphyrius commented 9 years ago

I removed libcppunit and everything still works. Thanks a lot!

astrojuanlu commented 9 years ago

Thanks to you! Closing this then.