djay0529 / mdanalysis

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

Installation fails with some versions of Cython #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
On Ubuntu 14.10 with Cython 0.21, running the following in bash (from 
https://code.google.com/p/mdanalysis/wiki/InstallRecipes):
sudo aptitude install build-essential python-dev python-setuptools python-pip
sudo aptitude install python-numpy python-scipy python-matplotlib  
python-biopython python-networkx  
sudo aptitude install libhdf5-serial-dev libnetcdf-dev
sudo pip install netCDF4
pip install --user MDAnalysis MDAnalysisTests

What is the expected output? What do you see instead?
This should install MDAnalysis.

Instead returns the following traceback:

Downloading/unpacking MDAnalysis
  Running setup.py (path:/tmp/pip_build_********/MDAnalysis/setup.py) egg_info for package MDAnalysis
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_********/MDAnalysis/setup.py", line 92, in <module>
        if not int(Cython.__version__.replace(".","")) >= int(required_version.replace(".", "")):
    ValueError: invalid literal for int() with base 10: '0201post0'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_********/MDAnalysis/setup.py", line 92, in <module>

    if not int(Cython.__version__.replace(".","")) >= int(required_version.replace(".", "")):

ValueError: invalid literal for int() with base 10: '0201post0'

What version of the product are you using? On what operating system?
Latest version (as of posting) on Ubuntu 14.10

Please provide any additional information below.

Cython version string seems to be the problem:
>>> print cython.__version__
0.20.1post0

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

GoogleCodeExporter commented 9 years ago
Hi,

This issue has been fixed and is not present in the dev branch. Yet, you can 
not access it with pip... So here is the workaround:

0. Create a temporary folder to store and modify the package before installing 
it:
    $ mkdir tmp
1. Download MDAnalysis without trying to install it:
    $ pip install -d tmp MDAnalysis
2. Extract the package:
    $ cd tmp; tar -xvf MDAnalysis-0.8.1.tar.gz
3. Go inside the newly-created directory named MDAnalysis-0.8.1:
    $ cd MDAnalysis-0.8.1
4. Edit the setup.py file and comment out (or simply delete) the lines 92 and 
93.
5. Save your changes and tell pip to install MDAnalysis from the current 
directory instead of looking online:
    $ pip install .

And voila! That should be sufficient and you may now delete the tmp folder.

Hope it helps,

Séb

Original comment by sebastie...@gmail.com on 5 Jan 2015 at 12:16

GoogleCodeExporter commented 9 years ago
This fixed the problem - thank you!

Original comment by Tom.Newp...@gmail.com on 5 Jan 2015 at 3:20

GoogleCodeExporter commented 9 years ago
Issue 226 has been merged into this issue.

Original comment by orbeckst on 16 Mar 2015 at 10:01