
Hi, I've got another problem, that also revolves around "paths". In my extension I use BioPython libraries. Unfortunately, in every file I have to determine the path to my Python installation (sys.path.append("C:\Python27\Lib\site-packages"), because otherwise, Chimera isn't able to import Biopython. Is there any way to fix that? Mateusz

The problem you're encountering is due to Chimera having its own copy of Python instead of using the installed system version. (We chose to bundle our own Chimera to avoid version issues, e.g., suppose you have 2.6 installed and Chimera needs 2.7.) In any case, there are a couple possible workarounds: 1. Specify PYTHONPATH in your environment to include C:\Python27\Lib\site-packages, so that Chimera picks up all the packages you've installed. This _should_ work, but there may be hidden gotchas that we do not know about (yet). 2. Install BioPython into Chimera's version of Python. There is a python.exe in the "bin" folder under the Chimera install location. If you install BioPython using that copy of Python, Chimera will be able to use BioPython without you having to mess with sys.path. Conrad On 5/12/11 10:48 AM, Mateusz Dobrychłop wrote:
Hi,
I've got another problem, that also revolves around "paths". In my extension I use BioPython libraries. Unfortunately, in every file I have to determine the path to my Python installation (sys.path.append("C:\Python27\Lib\site-packages"), because otherwise, Chimera isn't able to import Biopython.
Is there any way to fix that?
Mateusz
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

I want to second the use of Conrad's #2. This has worked flawlessly for me for a range of python toolkits including homebrew. In contrast, over the various versions of python through the last several years, #1 has almost always been problematic. -- David A. C. Beck, Ph.D. dacb@uw.edu Chemical Engineering & eScience Institute University of Washington, Seattle On May 12, 2011, at 10:56 AM, Conrad Huang wrote:
The problem you're encountering is due to Chimera having its own copy of Python instead of using the installed system version. (We chose to bundle our own Chimera to avoid version issues, e.g., suppose you have 2.6 installed and Chimera needs 2.7.)
In any case, there are a couple possible workarounds:
1. Specify PYTHONPATH in your environment to include C:\Python27\Lib\site-packages, so that Chimera picks up all the packages you've installed. This _should_ work, but there may be hidden gotchas that we do not know about (yet).
2. Install BioPython into Chimera's version of Python. There is a python.exe in the "bin" folder under the Chimera install location. If you install BioPython using that copy of Python, Chimera will be able to use BioPython without you having to mess with sys.path.
Conrad
On 5/12/11 10:48 AM, Mateusz Dobrychłop wrote:
Hi,
I've got another problem, that also revolves around "paths". In my extension I use BioPython libraries. Unfortunately, in every file I have to determine the path to my Python installation (sys.path.append("C:\Python27\Lib\site-packages"), because otherwise, Chimera isn't able to import Biopython.
Is there any way to fix that?
Mateusz
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hi Mateusz, I've noted some tips on development with Chimera at: http://plato.cgl.ucsf.edu/trac/chimera/wiki/ChimeraDevEnv These tips are not recommended for casual users. Of those docs, this one may be most helpful: http://plato.cgl.ucsf.edu/trac/chimera/wiki/ChimeraDevEnv I've had success with installation of Biopython in this way. Attached is a shell script that I use regularly to install extra packages (for linux and OSX; you must customize some of the initial path settings). Take care, Darren On 05/12/2011 10:48 AM, Mateusz Dobrych?op wrote:
Hi,
I've got another problem, that also revolves around "paths". In my extension I use BioPython libraries. Unfortunately, in every file I have to determine the path to my Python installation (sys.path.append("C:\Python27\Lib\site-packages"), because otherwise, Chimera isn't able to import Biopython.
Is there any way to fix that?
Mateusz
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
participants (4)
-
Conrad Huang
-
Darren Weber
-
David Beck
-
Mateusz Dobrychłop