[BioPython] Problem importing Bio.PDB
Brad Chapman
chapmanb at uga.edu
Wed May 26 12:18:24 EDT 2004
Hi Dave;
> When I try to import Bio.PDB I get the following message:
>
> >>> from Bio.PDB import *
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "D:\Python23\Lib\site-packages\Bio\PDB\__init__.py", line 10, in ?
> from PDBParser import PDBParser
> File "D:\Python23\Lib\site-packages\Bio\PDB\PDBParser.py", line 10, in ?
> from Numeric import array, Float0
> File "D:\Python23\Numeric\Numeric.py", line 91, in ?
> import multiarray
> ImportError: Module use of python20.dll conflicts with this version of
> Python.
This error comes from multiarray, which is part of the Numeric
package. What it indicates is that the multiarray module was built
against Python 2.0, instead of the Python 2.3.2 version that you are
using. Shared libaries built with one version of Python are often
not compatible across multiple versions, especially as far as from
2.0 to 2.3.
> I am using
> Python version 2.3.2
> Biopython version 1.3
> Numeric version 23.1 for Python 2.3
> Numarray version 0.9 for Python 2.3
>
> In my C:\WINNT\system32 folder I had three python--.dll versions
> python20.dll
> python21.dll
> python23.dll
Okay, I can't say for sure without knowing the whole history of the
three python versions and how everything was installed, but it looks
like at least part of Numeric was build against the Python 2.0. A
couple things I would look at:
1. When you type 'python' at a DOS command prompt, do you get the
Python version you expect (2.3.2)? If there are PATH confusions and
multiple versions of Python on a machine, you can very often end up
using versions you don't mean to.
2. How was Numeric built and installed? If you got a Windows
installer from somewhere, you may want to check the source of that
to make sure it was built correctly. If you built it yourself,
you'll need to supply us with more information before we can make
any guesses -- what compiler did you use? What was the process?
In general, the best thing to do to try and get things working is to
get rid of Numeric in your site-packages and reinstall the Python
2.3 version from a Windows installer. There are some available at
the numpy sourceforge page (http://sourceforge.net/projects/numpy).
Hope this helps.
Brad
More information about the BioPython
mailing list