Problem with installation

648 views
Skip to first unread message

Simone Colombo

unread,
Jan 12, 2018, 8:20:24 AM1/12/18
to fenics-...@googlegroups.com
Hi,

I'm trying to install Fenics on Ubuntu 17.10 64 bit with Python 2.7.13, installed on a virtual machine based on Windows 10.
I followed the instructions given on the site (https://fenicsproject.org/download/), using the commands:

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics
sudo apt-get dist-upgrade

The installation completes without errors but I'm not able to use Fenics. If I try to run a python script in which I import fenics, it gives me an ImportError (no module named fenics).

I tried also the installation via Anaconda but in that case I cannot use the mshr module, and I need it.
I tried to build the package from sources but it also gives me some errors (when I try to build ffc, it does not recognize correctly the dependancies).

I'm not a Linux expert but I need to use Fenics on Ubuntu, could you help me with the installation?
Thanks for your attention.

Kind regards,
Simone

Jan Blechta

unread,
Jan 15, 2018, 7:39:11 AM1/15/18
to Simone Colombo, fenics-...@googlegroups.com
On Fri, 12 Jan 2018 14:20:20 +0100
Simone Colombo <simone....@bluethink.it> wrote:

> Hi,
>
> I'm trying to install Fenics on Ubuntu 17.10 64 bit with Python
> 2.7.13, installed on a virtual machine based on Windows 10.
> I followed the instructions given on the site (
> https://fenicsproject.org/download/), using the commands:
>
> sudo add-apt-repository ppa:fenics-packages/fenics

FEniCS is not yet available in this PPA for 17.10. So far there is an
experimental build in ppa:fenics-packages/fenics-2017.2.0 instead but
it has some rough edges so far. Maintenance of the PPA is very time
consuming so apologize please that the package has not been made
available yet in the official PPA.

You can try

sudo add-apt-repository ppa:fenics-packages/fenics-2017.2.0

in the mean time.

Jan
Message has been deleted

Simone Colombo

unread,
Jan 15, 2018, 7:50:30 AM1/15/18
to Jan Blechta, fenics-...@googlegroups.com
Edit: Thanks Jan, now fenics seems to work with the mshr package, but I didn't start to use it yet. I installed the version 2016.2.0 both for the fenics package and the missing mshr module. Could you tell me if the version in the ppa is complete of the mshr module and if it works with Ubuntu 16.04.3?

I finally solved the issue.
Those are the steps I followed:

1. I installed fenics using the Ubuntu packages:

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics

After that step, fenics already works but the mshr module is missing.

2. I downloaded separately the mshr module from https://bitbucket.org/fenics-project/mshr

3. I installed some dependancies:

sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr-dbg
sudo apt-get install libgmp3-dev

4. After that I installed mshr

cmake path/to/mshr
make
make install

Those commands gave me a few errors, such as :
- "install TARGETS given no LIBRARY DESTINATION for shared library target" after make command but it disappeared after a second attempt, I don't really know why;
- "mshr file INSTALL cannot copy file", after the make install command, disappeared after that I logged as root
 
5. Finally, I have added the path/to/libmshr.so to the LD_LIBRARY_PATH, with the following commands

export /LD_LIBRARY_PATH="path/to/libmshr.so"
sudo nano /etc/ld.so.conf.d/lib_for_mshr.conf

adding the line

/path/to/libmshr.so

and saving the file.

Finally I updated the cache with

sudo ldconfig

Now mshr seems to work.

Hope this helps.

Simone



Jan Blechta

unread,
Jan 15, 2018, 8:41:53 AM1/15/18
to Simone Colombo, fenics-...@googlegroups.com
On Mon, 15 Jan 2018 13:50:27 +0100
Simone Colombo <simone....@bluethink.it> wrote:

> Edit: Thanks Jan, now fenics seems to work with the mshr package, but
> I didn't start to use it yet. I installed the version 2016.2.0 both
> for the fenics package and the missing mshr module. Could you tell me
> if the version in the ppa is complete of the mshr module and if it
> works with Ubuntu 16.04.3?

It seems it does, see https://launchpad.net/~fenics-packages. Xenial
and artful should soon have 2017.2.0 release too.

Jan

>
> I finally solved the issue.
> Those are the steps I followed:
>
> 1. I installed fenics using the Ubuntu packages:
>
> sudo add-apt-repository ppa:fenics-packages/fenics
> >
> sudo apt-get update
> >
> sudo apt-get install fenics
> >
>
> After that step, fenics already works but the mshr module is missing.
>
> 2. I downloaded separately the mshr module from
> https://bitbucket.org/fenics-project/mshr
>
> 3. I installed some dependancies:
>
> sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr-dbg
> >
> sudo apt-get install libgmp3-dev
> >
>
> 4. After that I installed mshr
>
> cmake path/to/mshr
> >
> make
> >
> make install
> >
>
> Those commands gave me a few errors, such as :
> - "install TARGETS given no LIBRARY DESTINATION for shared library
> target" after *make* command but it disappeared after a second
> attempt, I don't really know why;
> - "mshr file INSTALL cannot copy file", after the *make install*
Message has been deleted
Message has been deleted

juan landauro

unread,
Jul 2, 2019, 10:36:01 AM7/2/19
to fenics-support
Hello SimoC

I think you are the right person to ask, and I hope you may help me or redirect to somebody that could help me. I do have all the problems you encounter by installing PPA fenics. The installation went smooth without errors. The final step was to check the installation by typing: My directory ~$ python -c 'import fenics' or python -c 'import dolfin' yield module fenics not found or module dolfin not found. fenics is not in my home directory, Anaconda3 (Spyder) is. I do not know where in my machine are these 12 packages:

libdolfin-dev (2 2019.1)

python3-dolfin (2 2019.1)

dolfin-doc (2 2019.1)

dolfin-bin (2 2019.1)

python3-ffc (2 2019.1)

python3-fiat (2 2019.1)

python3-ufl (2 2019.1)

python-ufl-doc (2 2019.1)

python3-dijitso (2 2019.1)

python3-mshr (2 2019.1)

fenics:i386 (35 1:2019.1.0.1~ppa1~disco1)

fenics:i386 (38 1:2019.1.0.1~ppa1~disco1)


Data: Ubuntu machine (19.04), fenics version 2019.1.0.1. O would like to use Spyder IDE to run fenics code and I do not know how to link those fenics packages with that stuff in my directory (home)-Anaconda3, for example. I hope you could help me.

Johannes Ring

unread,
Jul 2, 2019, 12:21:58 PM7/2/19
to juan landauro, fenics-support
FEniCS is only working with Python 3, so you should do `python3 -c "import dolfin"` to check the installation.

Johannes

--
You received this message because you are subscribed to the Google Groups "fenics-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fenics-suppor...@googlegroups.com.
To post to this group, send email to fenics-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/c1fc444c-e3a8-4f3f-b395-6d611d3f55c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages