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

how to get a shell with PATH's setup to work with FEniCS on Debian Linux system

0 votes

I recently installed FEniCS on a Debian Linux system. Previously I was using it on a mac. When I used it on my mac, I "started" FEniCS by double clicking on the FEniCS folder to obtain a shell the familiar message

This is a shell with PATH's setup to work with FEniCS. If you are new
to FEniCS you probably want to have a look at the DOLFIN demo
programs. They are located under

/Applications/FEniCS.app/Contents/Resources/share/dolfin/demo

For more information please visit the project website:

http://www.fenicsproject.org

Within this terminal window I could run my programs. However, on the Debian Linux system I can't find how to start a shell in which FEniCS programs can be run. Can someone help me?

asked Jan 11, 2015 by bseguin FEniCS Novice (650 points)

1 Answer

0 votes

If you installed FEniCS from the package manger, for instance by running

sudo apt-get install fenics

then you should be able to run FEniCS programs without modifying your environment. The demo programs will be available in /usr/share/dolfin/demo. However, this directory is write protected, so you should copy this to a directory where you have write permisson. There is a script dolfin-get-demos that comes with the FEniCS installation that will do this automatically for you. Simply run

dolfin-get-demos

and the demo files will be copied to your home directory, that is, $HOME/dolfin-demos.

answered Jan 12, 2015 by johannr FEniCS Expert (17,350 points)

Thanks a lot. I ran the script and it created the folder, just like you said. When I tried to run the demos I got the message

---------------------------------------------------
DOLFIN runtime dependency is not met.
Install the following python module: 'ply.lex'
and make sure its location is listed in PYTHONPATH.
---------------------------------------------------

So it appears that my problem is a missing python module now.

Install the package python-ply:

sudo apt-get install python-ply

I'm not sure why this wasn't installed when you installed fenics. Which version of Debian do you have?

Thanks for the quick reply. After running the command you mentioned and trying a FEniCS program again, I got

Traceback (most recent call last):
  File "demo_poisson.py", line 37, in <module>
    from dolfin import *
  File "/usr/lib/python2.7/dist-packages/dolfin/__init__.py", line 16, in <module>
import cpp
  File "/usr/lib/python2.7/dist-packages/dolfin/cpp/__init__.py", line 42, in <module>
    exec("import %s" % module_name)
  File "<string>", line 1, in <module>
ImportError: No module named common

I have Debian 7.8.

...