Hi again,

It seems as I'm stuck with using the wrapper cctbx.python.

Only one module complains now = Pymol

  File "PyWAXS.py", line 8, in <module>
    import pymol
ImportError: No module named pymol

I have found a fix to the problem in the ccp4 mailing list:

modifying the pymol startup script to source the cctbx setpaths.sh

but I'm not sure how to implement this solution.

Here's what I've tried:

In the macports pymol startup script I've added the line:

source /Users/magnus/Downloads/cctbx_build/setpaths.sh

but I get the same error....

Suggestions?

Magnus
 
On 03 Jun 2014, at 20:55, Magnus Andersson <[email protected]> wrote:

Hi Luc,

The problem is I have a macports python build that contains all the rest of the modules that I import in this script. Because cctbx is not included in macports I have a separate build for this. Hence I need to call my script as:

/opt/local/bin/python2.7 script.py

I have set the PYTHONPATH in the bash shell:

export PYTHONPATH=/Users/magnus/Downloads/cctbx_sources:/opt/local

But, it's not working. Any suggestions how to deal with this?

Thanks,

Magnus


On 03 Jun 2014, at 20:47, Luc Bourhis <[email protected]> wrote:

Hi Magnus,

you need to use the wrappers cctbx.python instead of python as it sets PYTHONPATH correctly so as to add that cctbx_sources/boost.

Best wishes,

Luc

On 3 Jun 2014, at 20:33, Magnus Andersson <[email protected]> wrote:

Hi,

I've installed the cctbx package from the selfextracting file found in http://cci.lbl.gov/cctbx_build/ 

but I run into problems when importing cctbx in my python script:

    import iotbx.pdb
  File "/Users/magnus/Downloads/cctbx_sources/iotbx/pdb/__init__.py", line 2, in <module>
    from cctbx.array_family import flex
  File "/Users/magnus/Downloads/cctbx_sources/cctbx/array_family/flex.py", line 2, in <module>
    import scitbx.array_family.flex
  File "/Users/magnus/Downloads/cctbx_sources/scitbx/array_family/flex.py", line 2, in <module>
    import boost.optional # import dependency
ImportError: No module named boost.optional

It is flex.py that wants to import boost.optional and does not find it. 

However, I find these three files:

optional.hpp optional_fwd.hpp optional_io.hpp

in the following directory:

/Users/magnus/Downloads/cctbx_sources/boost/boost/optional

which suggests that it's present. What am I missing here? I'm using Mac OS X Version 10.9.3 and Python2.7.

Cheers,

Magnus

_______________________________________________
cctbxbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb

_______________________________________________
cctbxbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb