Thank you Johannes. Using your apt-get instructions fixed my problem.
It seems that there was some sort of problem with the upgrade performed
by the Synaptic package manager, and I could not tell that anything was
wrong. Using apt-get caused all the post-install configurations to take
place, and now everything works as it should. The lesson I take from
this is not to rely on Synaptic.
On 03/12/2014 08:08 AM, Johannes Ring wrote:
On Wed, Mar 12, 2014 at 1:49 AM, Mike Sussman <[email protected]> wrote:
This is a follow-up to my recent post. In that post, I reported the error
ImportError: No module named petsc4py.PETSc
when attempting to run demo_poisson.py.
Looking through a transcript of what I was doing, I realized that I had
successfully run one of the tutorial scripts: d1_p2D.py earlier in the
afternoon and it ran successfully. But then I upgraded my system using
synaptic and I noticed that I am now running fenics 1:1.3.0.2. After that
upgrade d1_p2D.py doesn't work. In fact, the single command "from dolfin
import *" fails with the message:
from dolfin import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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>
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/la.py", line 30, in
<module>
_la = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/la.py", line 26, in
swig_import_helper
_mod = imp.load_module('_la', fp, pathname, description)
ImportError: No module named petsc4py.PETSc
Is it possible that something is wrong with the upgrade?
Yes. This works fine for me in a clean Ubuntu 13.04 machine. Make sure
you upgrade all packages by running:
sudo apt-get update
sudo apt-get dist-upgrade
Let us know if that doesn't resolve your problem.
BTW, Ubuntu 13.04 is no longer supported by Ubuntu, so you should
consider upgrading to 13.10.
Johannes
--
Mike Sussman
[email protected]
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support