dimchris / mdanalysis

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

Installing mdanalysis without netcdf #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running
python setup.py install --prefix $HOME/local

I get the following error:
ValueError: did not find HDF5 headers in 
/home/ppxasjsm/local/stow/NetCDF/include

I don't have administrative right where i would like to install mdanalysis and 
I mainly need it to read .xtc trajectories. 
Is there any way of installing mdanalysis without HDF5?

Original issue reported on code.google.com by antonia....@gmail.com on 18 Dec 2012 at 5:02

GoogleCodeExporter commented 9 years ago
Can you please attach the full output setup.log of 

  python setup.py install --prefix=$HOME/local >setup.log 2>&1

It's possible that MDAnalysis is already installed and that what you're seeing 
is the attempt to automatically install the NetCDF Python package.

Did you try running the UnitTests?

Original comment by orbeckst on 18 Dec 2012 at 5:07

GoogleCodeExporter commented 9 years ago
It seems to fail when it want to install netcdf4-python.

I also tried to install netcdf4 python manually before but again the HDF5 
header seems to be the same issue.

I have also set an environment variable to the netcdf installation export 
HDF5_DIR=$HOME/local/include which does include a netcdf header file, but I 
guess it is not the correct header

Original comment by antonia....@gmail.com on 18 Dec 2012 at 5:18

GoogleCodeExporter commented 9 years ago
> It seems to fail when it want to install netcdf4-python.

Ok.

Please run the UnitTests and post a summary of the results. Install 
MDAnalysisTests and either run from within python

 import MDAnalysis.tests
 MDAnalysis.tests.test(label="full", extra_argv=["--exe"])

or from the MDAnalysisTests directory with 

 nosetests -v

Most of them should pass but anything related to AMBER netcdf will fail.

> I also tried to install netcdf4 python manually before but again the HDF5 
header seems to be the same issue.

https://code.google.com/p/mdanalysis/wiki/netcdf has recipes that worked for us.

But if you don't need the AMBER netcdf Reader/Writer then you should be able to 
do without it.

> I have also set an environment variable to the netcdf installation export 
HDF5_DIR=$HOME/local/include which does include a netcdf header file, but I 
guess it is not the correct header

You might need specific versions of the libraries and you must use certain 
compilation options. But this is all explained in the docs for netcdf-python 
(see links on our https://code.google.com/p/mdanalysis/wiki/netcdf page).

Original comment by orbeckst on 18 Dec 2012 at 5:53

GoogleCodeExporter commented 9 years ago
Thans for the help so far!
> Please run the UnitTests and post a summary of the results. Install 
MDAnalysisTests and either run from within python

 import MDAnalysis.tests
 MDAnalysis.tests.test(label="full", extra_argv=["--exe"])

I have attached the output generated from the Unit Test

I installed a binary of HDF5 and by hand netcdf-python which both seemed to 
have worked.
Then once again I do the setup.py install --prefix mydir and the python setup 
ran through. 
This time there was no obvious error. I have attached the setup output again.

When I start python and try to import mdanalysis, I get the following error:

---> 1 import MDAnalysis

/home/ppxasjsm/MDAnalysis-0.7.6/MDAnalysis/__init__.py in <module>()
    211 from core import Timeseries
    212 from core.AtomGroup import Universe, asUniverse
--> 213 from coordinates.core import writer as Writer
    214 
    215 collection = Timeseries.TimeseriesCollection()

/home/ppxasjsm/MDAnalysis-0.7.6/MDAnalysis/coordinates/__init__.py in <module>()
    553 __all__ = ['reader', 'writer']
    554 
--> 555 import PDB, PQR, DCD, CRD, XTC, TRR, GRO, XYZ, TRJ, PDBQT, LAMMPS
    556 import base
    557 from core import reader, writer

/home/ppxasjsm/MDAnalysis-0.7.6/MDAnalysis/coordinates/DCD.py in <module>()
    359 
    360 # Add the c functions to their respective classes so they act as class methods
--> 361 import _dcdmodule
    362 import new
    363 DCDReader._read_dcd_header = new.instancemethod(_dcdmodule.__read_dcd_header, None, DCDReader)

ImportError: No module named _dcdmodule

Original comment by antonia....@gmail.com on 18 Dec 2012 at 6:50

Attachments:

GoogleCodeExporter commented 9 years ago
It looks as if you successfully installed MDAnalysis. The important UnitTests 
pass, so that's good.

About your error when trying to import MDAnalysis:

> When I start python and try to import mdanalysis, I get the following error:
> 
> ---> 1 import MDAnalysis
> [...]
> ImportError: No module named _dcdmodule

Make sure that you do NOT run python in your sources. You (correctly) installed 
everything in 
/home/ppxasjsm/local/stow/lib/python2.7/site-packages/MDAnalysis-0.7.6-py2.7-lin
ux-x86_64.egg (the UnitTests pass). I assume that you're trying to run from the 
checked out sources (ie the directory that contains setup.py) and that won't 
work because the compiled libraries are in the wrong place.

Try running python from $HOME.

(Btw, you can run from checked out sources with 'python setup.py develop'.)

Original comment by orbeckst on 18 Dec 2012 at 8:04

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 50e6f5a36595.

Original comment by orbeckst on 18 Dec 2012 at 8:47