djay0529 / mdanalysis

Automatically exported from code.google.com/p/mdanalysis
0 stars 0 forks source link

Cannot import name distances #205

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install MDAnalysis using the method described here: 
https://code.google.com/p/mdanalysis/issues/detail?can=2&start=0&num=100&q=&cols
pec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&i
d=204
2. In a python shell, type "import MDAnalysis"

What is the expected output? What do you see instead?
Expect MDAnalysis to be imported

Actual output (Python 2.7):
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MDAnalysis import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "MDAnalysis/__init__.py", line 221, in <module>
    from coordinates.core import writer as Writer
  File "MDAnalysis/coordinates/__init__.py", line 597, in <module>
    import PDB, PQR, DCD, CRD, XTC, TRR, GRO, XYZ, TRJ, PDBQT, LAMMPS, DMS, TRZ
  File "MDAnalysis/coordinates/PDB.py", line 225, in <module>
    from MDAnalysis.topology.core import guess_atom_element
  File "MDAnalysis/topology/__init__.py", line 214, in <module>
    import core
  File "MDAnalysis/topology/core.py", line 39, in <module>
    from ..core import distances
ImportError: cannot import name distances

Python 3.4:
Python 3.4.2 |Anaconda 2.1.0 (64-bit)| (default, Oct 21 2014, 17:16:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import MDAnalysis
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sansom/n15/shil3498/Downloads/tmp/MDAnalysis-0.8.1/MDAnalysis/__init__.py", line 219, in <module>
    from core import Timeseries
ImportError: No module named 'core'

What version of the product are you using? On what operating system?
Latest version as of posting on Ubuntu 14.10 with Python 2.7 and Anaconda 
Python 3.4

Please provide any additional information below.
The installation completed with a lot of warnings.

Original issue reported on code.google.com by Tom.Newp...@gmail.com on 5 Jan 2015 at 3:32

GoogleCodeExporter commented 9 years ago
Hi Tom,

1) Make sure that you are NOT inside the unpacked sources; to be safe, do a 'cd 
~' or similar.

2) Just FYI: There's currently no official Python 3 version so I wouldn't count 
on it working with Python 3 (see Issue 132).

My suspicion is that it is (1) because the compiled code will not be found in 
the sources.

If this is not that then please continue with this issue report.

Oliver

Original comment by orbeckst on 5 Jan 2015 at 11:42

GoogleCodeExporter commented 9 years ago
Hi,

Given the path in the traceback 
("/sansom/n15/shil3498/Downloads/tmp/MDAnalysis-0.8.1/MDAnalysis/__init__.py"), 
I think that Oliver is right about you being "inside the unpacked sources".
Yet, I suspect that the true problem is due to Python 3: I am the one working 
on Py3 support and I can assure you that, currently, there is no version of 
MDAnalysis (including the one in development) that can handle Python 3. As a 
matter of fact, there a couple of extension that need to be rewritten in order 
to support (ultimately and seamlessly) both Python 2 and 3.
So in short, get out of the source dir, use Python 2 and everything should be 
fine.

Please drop an email if everything is working so we can tag this issue as 
"fixed".

Original comment by sebastie...@gmail.com on 6 Jan 2015 at 8:30

GoogleCodeExporter commented 9 years ago
Hi Oliver and Seb,

That's fixed the problem - thank you very much for spotting the error!

Tom

Original comment by Tom.Newp...@gmail.com on 6 Jan 2015 at 9:58

GoogleCodeExporter commented 9 years ago
Ok good to know!

Séb

Original comment by sebastie...@gmail.com on 6 Jan 2015 at 10:47