from cctbx import sgtbx,uctbx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/rawdata12/cctbx_standalone/cctbx_sources/cctbx/sgtbx/__init__.py",
Does this work?
cctbx.python
from cctbx import sgtbx
The setpaths scripts only add one entry to PATH and leave the shell environment unmodified otherwise.
This is the only way to avoid bad interferrences with other Python-based systems, among other things.
cctbx.python is a small shell script (automatically generated) that updates PYTHONPATH and LD_LIBRARAY_PATH
"just in time" before calling the actual python executable. You should never have to manually set PYTHONPATH
for the cctbx modules.
more cctbx_build/bin/cctbx.python
to see how it works.
You can set PYTHONPATH to point to other (non-cctbx) packages and it will be preserved when you
run cctbx.python.
You could also source setpaths_debug.sh to set PYTHONPATH and LD_LIBRARY_PATH for the cctbx packages
permanently in your environment, but in my experience this can cause a lot of confusion.
Ralf
----- Original Message ----
From: hari jayaram
To: [email protected]
Sent: Mon, November 2, 2009 8:53:45 AM
Subject: [cctbxbb] using cctbx and sgtbx module
Hi I am trying to use a Python plugin SuperSymExample which has cctbx
modules sgtbx and uctbx as dependencies.
I wanted to build these modules for my system python 2.5.2 on ubuntu
hardy heron 8.04 64 bit linux.
I downloaded the selfx file for the cctbx alone ( without Python) and
then had the build complete fully. I used the setpaths utility and
then modifies m,y PYTHONPATH.
Now after I add the appropriate directories to my PYTHONPATH , if I
import sgtbx and uctbx in a python interactive session I get an error
( see below)
My PYTHONPATH has:
export PYTHONPATH="$PYTHONPATH:/rawdata12/cctbx_standalone/cctbx_sources:/rawdata12/cctbx_standalone/cctbx_sources/boost_adaptbx"
The error I get when I say from cctbx import sgtbx , uctbx:
ImportError: __import__("boost_python_meta_ext"): libboost_python.so:
undefined symbol: PyUnicodeUCS2_FromEncodedObject
What can I do to avoid the error and use the Plugin correctly.
Thanks
Hari
Detailed error message:
hari@charlie:/rawdata12/cctbx_auto/cctbx_build/lib$ python
Python 2.5.2 (r252:60911, Jul 22 2009, 15:33:10)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
line 2, in <module>
from cctbx import uctbx
File "/rawdata12/cctbx_standalone/cctbx_sources/cctbx/uctbx/__init__.py",
line 1, in <module>
from cctbx.array_family import flex
File "/rawdata12/cctbx_standalone/cctbx_sources/cctbx/array_family/flex.py",
line 1, in <module>
import scitbx.array_family.flex
File "/rawdata12/cctbx_standalone/cctbx_sources/scitbx/array_family/flex.py",
line 1, in <module>
import boost.optional
File "/rawdata12/cctbx_standalone/cctbx_sources/boost_adaptbx/boost/optional.py",
line 1, in <module>
import boost.python
File "/rawdata12/cctbx_standalone/cctbx_sources/boost_adaptbx/boost/python.py",
line 45, in <module>
ext = import_ext("boost_python_meta_ext")
File "/rawdata12/cctbx_standalone/cctbx_sources/boost_adaptbx/boost/python.py",
line 24, in import_ext
+ [" "+p for p in sys.path]))
ImportError: __import__("boost_python_meta_ext"): libboost_python.so:
undefined symbol: PyUnicodeUCS2_FromEncodedObject
sys.path:
/usr/lib/python2.5/site-packages
/rawdata12/wx-widgets-read-only/wxPython
/home/hari/ccp4-6.0.99e/share/python
/rawdata12/cctbx_auto/cctbx_build/lib
/home/hari
/rawdata12/cctbx_standalone/cctbx_sources
/rawdata12/cctbx_standalone/cctbx_sources/boost_adaptbx
/usr/lib/python25.zip
/usr/lib/python2.5
/usr/lib/python2.5/plat-linux2
/usr/lib/python2.5/lib-tk
/usr/lib/python2.5/lib-dynload
/usr/local/lib/python2.5/site-packages
/usr/lib/python2.5/site-packages
/usr/lib/python2.5/site-packages/Numeric
/usr/lib/python2.5/site-packages/PIL
/home/hari/djtrunk
/usr/lib/python2.5/site-packages/kodos
/usr/lib/python2.5/site-packages/gst-0.10
/var/lib/python-support/python2.5
/usr/lib/python2.5/site-packages/gtk-2.0
/var/lib/python-support/python2.5/gtk-2.0
/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode
_______________________________________________
cctbxbb mailing list
[email protected]
http://www.phenix-online.org/mailman/listinfo/cctbxbb