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

name 'RectangleMesh' is not defined

0 votes

I've got two workstations, one iMac, and another with Debian wheezy. I've installed fenics on both of them, in the case of the Debian machine using "sudo apt-get install fenics".

In the case of the Debian machine, when i run RectangleMesh(x0,u0,x1,y1,xn,yn) in python i get the error: NameError: name 'RectangleMesh' is not defined. When running the exact same piece of code on the iMac it produces no such error.

What could be the error? Is there a way to check the current version number of fenics installed?

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

1 Answer

0 votes
 
Best answer

See:

http://fenicsproject.org/qa/4034/test-fenics-version?show=4034#q4034

to check the fenics version.

To install the most recent released version, see:

http://fenicsproject.org/download/ubuntu_details.html

answered Mar 9, 2015 by V_L FEniCS User (4,440 points)
selected Mar 13, 2015 by ASN

Thank you.

I ran dolfin-version, and apparently sudo apt-get install fenics installed fenics 1.0.0. and not 1.5.0.

I already found http://fenicsproject.org/download/ubuntu_details.html, suspecting it might be a version issue. Following the instructions

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

has no effect as i get the return

W: Failed to fetch http://ppa.launchpad.net/fenics-packages/fenics/ubuntu/dists/wheezy/main/source/Sources 404 Not Found

The FEniCS PPA is only for Ubuntu, not Debian. The Debian wheezy repository only has FEniCS 1.0.0 packages, but you can use for instance the fenics-install.sh script to build FEniCS and its dependencies from source.

Thank you Johannr, i realized that and used the fenics-install.sh script to build FEniCS as you propose. It works great, except i get an ImportError if i try to import and use scipy.

...