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

Latest update breaks FEniCS on Xubuntu?

+4 votes

Hi

I am using Xubuntu 12.04 LTS, and it was working fine with the development version of FEniCS, till yesterday where I allowed an upgrade.

I tried reinstalling FEniCS, but I stil get

  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/dolfin/__init__.py", line 39, in <module>
    from dolfin.functions import *
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/__init__.py", line 4, in <module>
from dolfin.functions import function
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/function.py", line 34, in <module>
from dolfin.functions.constant import Constant
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/constant.py", line 29, in <module>
import ufl.domains
ImportError: No module named domains

I would like to avoid a distribution upgrade.

Thanks a lot,
Kristian

asked Feb 21, 2014 by KristianE FEniCS Expert (12,900 points)

I am getting the same problem on ubuntu 13.10... I only just upgraded and now I can't import dolfin: "ImportError: No module named domains".

I have got here the very same situation. Even the nightlies won't work.

I encountered the same problem yesterday. Compiling with dorsal fixed the problem for me, so if that's an option for you it might be a stopgap solution. Looking at the source code it seems that there is an interface incompatibility caused by a recent update, which should hopefully be fixed if they roll out a new snapshot in the development PPA. Looking at [1] all the packages have recent builds from 2014-02-20 except dolfin; perhaps that's what's causing the issue? Maybe worth pinging the mailing list so that this gets better visibility.

[1] https://launchpad.net/~fenics-packages/+archive/fenics-dev

I am aware of the problem. It is related to the recent merge of UFC and FFC and will require some work before it is sorted out. Until then, the best solution is to remove the fenics-dev PPA as described in the answer below. This will give you FEniCS 1.3.0, which is a more recent version than what was in the fenics-dev PPA anyway. Building from source is the only way to get FEniCS-dev at the moment.

1 Answer

+1 vote
 
Best answer

Try:

sudo apt-get -y purge fenics && \
sudo apt-get -y autoremove && \
sudo rm /etc/apt/sources.list.d/fenics-packages-fenics-dev-`lsb_release -cs`.list && \
sudo apt-get update && \
sudo apt-get -y install fenics

It worked for me.

answered Feb 22, 2014 by hgar FEniCS Novice (770 points)
selected Feb 26, 2014 by KristianE

This is not a solution, as it will just install 1.2.0 instead of the development version (1.3.0).

Not only that, but the default ubuntu installation comes without cgal.

This should actually give you version 1.3.0 from the FEniCS PPA and it is the best solution for now (without building from source).

This workaround didn't work for me. I still get the same error, even with the standard FEniCS PPA and the following version of FEniCS: 1:1.3.0.2~ppa1~saucy1. I use Ubuntu 13.10 saucy.

I had the same problem. You need to uninstall all FEniCS related packages manually. I used synaptic for this purpose where I filtered for all software whichs version contained "git201". The names of the packages can be found in the FEniCS nightlies ppa. Be careful though, not to delete any other packages as other software might also show up with the above filter. Afterwards, just reinstall FEniCS from the normal PPA.

If this does not work, check in synaptic, if the fenics-dev ppa is really removed from your sources.


Remark: Synaptic might not be installed on your system. Informations can be foung here (Synaptic). All can be done from the command line as well. I think the course would be something like

sudo apt-get -y purge {package_name} && \
sudo apt-get -y autoremove

for each package in the ppa.

Thanks! Worked like a charm. I searched for "git201" and "ppa1". Then only FEniCS-related packages showed up. I removed them all and reinstalled FEniCS without the fenics-dev PPA and I can now import dolfin.

...