[CIG-SHORT] unable to load _petsc

Brad Aagaard baagaard at usgs.gov
Thu Feb 16 13:13:16 PST 2012


Jeff,

You are correct that this problem suggests a problem with your 
environment. Hopefully, you used the pylith_installer utility to build 
from source. If so, then all of the environment variables are in the 
setup.sh file at the top-level directory where you built PyLith. Make 
sure you set these variables either by putting them in your .bashrc file 
(or equivalent such as .profile) or run "source setup.sh" before running 
PyLith.

The Python module that cannot be loaded is _petscmodule.so in 
$PREFIX/lib/python${PYTHON_VERSION}/site-packages/pylith/utils.

To test loading this module:
python
import pylith.utils._petsc

Brad


On 02/16/2012 12:52 PM, Jeff Dusenberry wrote:
> I have built a copy of pylith from the source tarball, and it seemed
> successful, but when I try to run it, it fails to load _petsc.  Here's
> the traceback:
>
> Traceback (most recent call last):
>     File "./pylith", line 37, in<module>
>       from pylith.apps.PyLithApp import PyLithApp
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/apps/PyLithApp.py",
> line 23, in<module>
>       from PetscApplication import PetscApplication
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/apps/PetscApplication.py",
> line 27, in<module>
>       class PetscApplication(Application):
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/apps/PetscApplication.py",
> line 41, in PetscApplication
>       from pylith.utils.PetscManager import PetscManager
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/utils/PetscManager.py",
> line 29, in<module>
>       import pylith.utils.petsc as petsc
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/utils/petsc.py",
> line 25, in<module>
>       _petsc = swig_import_helper()
>     File
> "/share/apps/pylith-1.6.2_intel/lib/python2.6/site-packages/pylith/utils/petsc.py",
> line 17, in swig_import_helper
>       import _petsc
> ImportError: No module named _petsc
>
>
> I thought that this might be a PYTHONPATH issue, but I have not been
> able to find _petsc anywhere in order to add it to the path.  Can
> someone point me in the right direction?  Did I miss something in the
> compile?
>
> Thanks,
> Jeff
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>



More information about the CIG-SHORT mailing list