Installing FEniCS for Python 3 without Anaconda


1.5k
views
0
8 months ago by
I followed the instructions on https://fenicsproject.org/download/ to install "FEniCS on Ubuntu" (I am using Ubuntu 16.04)

However, this seems to only install it for Python2.7.

When I run python3 -c 'import fenics' I get ImportError: No module name 'fenics' (I am using Python 3.5.2)
Community: FEniCS Project
I have installed Fenics using docker on OpenSUSE and I can run with python3. Maybe the ubuntu version does not support python3. You could install Fenics on ubuntu using docker.
written 8 months ago by Praveen C  
I know almost nothing about Docker, but does it allow me to use FEniCS like I use any other package? I really don't want to develop a different workflow just for using FEniCS (i.e. I don't want to use virtual environments, set up a new Python distribution, use a different terminal, run `docker ...` instead of `python ...`)
written 8 months ago by Bananach  
I think Fenics via Docker is the only way to get full Fenics, other than compiling yourself. It does require a little bit of change. E.g., you cannot get matplotlib displays and you have to use ipython notebooks for that. Other than this, I have not had any issues. You need one terminal running the docker container where you run python, and a different terminal where you do other things like editing, visualizing (say with VisIt/Paraview). Regarding ubuntu/python3 issue, I think you may get better answers on fenics-support@googlegroups.com
written 8 months ago by Praveen C  
FEniCS would be a small part of a larger software package I am writing. How do other people deal with situations like this? Do they really accept having to run and install multiple terminals and containers and changing the way essential packages (such as matplotlib) are used? What if every component of such a larger software package had its own special way of how it needs to be run and installed? I am really confused about Docker, sorry if I'm misrepresenting something here, but maybe I have a chance here of learning something. In any case, I will contact the Google group, thanks for the link
written 8 months ago by Bananach  

2 Answers


0
8 months ago by
I just (Nov 29, 2017) installed dolfin-python3 on Ubuntu 16.04, apt-get install.  Fenics should have its full capacity in Linux
0
8 months ago by
Saro  
Hello Bananach,

  Please see my post here: https://www.allanswered.com/post/begvq/import-problem-dolfin-on-ubuntu-16-04/ .

  Basically, Python 2 seems to be required for FEniCS on Ubuntu 16.04. As a note, I used the FEniCS PPA.
Please login to add an answer/comment or follow this question.

Similar posts:
Search »