fenics won't install on Ubuntu because of python-ufl

Asked by Doug Arnold

I am trying to install fenics from the fenic ppa under Ubuntu lucid. I removed all the older
versions and, after making sure that the ppa was in my source list, I ran "sudo apt-get install fenics".
After installing a lot of things, the process failed at

Setting up python-ufl (0.9.1-2~ppa1~lucid1) ...
Compiling /usr/lib/python2.5/site-packages/ufl/finiteelement.py ...
  File "/usr/lib/python2.5/site-packages/ufl/finiteelement.py", line 284
    return MixedElement(*elements, value_shape=self.value_shape())
                                             ^
SyntaxError: invalid syntax

pycentral: pycentral pkginstall: error byte-compiling files (65)
pycentral pkginstall: error byte-compiling files (65)
dpkg: error processing python-ufl (--configure):
 subprocess installed post-installation script returned error exit status 1

What should I do?

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Johannes Ring
Solved:
Last query:
Last reply:
Revision history for this message
Best Johannes Ring (johannr) said :
#1

AFAICT Python 2.5 is not part of the official Ubuntu Lucid repository. How did you install this?

I'm not sure how to resolve this but you might need to remove Python 2.5. You can also try to run

  sudo apt-get -f install

to force the installation of python-ufl but I'm not sure it will help in this case.

Revision history for this message
Doug Arnold (dnarnold) said :
#2

Thanks for pointing this out. I'm not sure why, put I had both Python 2.5 and Python 2.6 installed.
I found the Python 2.5 packages with "dpkg -l |grep python2.5" and gave the command
"sudo apt-get remove python2.5 python2.5-dev python2.5-minimal". This not only removed Python 2.5,
but also triggered the completion of the installation for fenics.

I really appreciate the quick and accurate advice.

Revision history for this message
Doug Arnold (dnarnold) said :
#3

Thanks Johannes Ring, that solved my question.