Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem installing/cythonizing files #615

Closed
richardjgowers opened this issue Jan 11, 2016 · 2 comments
Closed

Problem installing/cythonizing files #615

richardjgowers opened this issue Jan 11, 2016 · 2 comments

Comments

@richardjgowers
Copy link
Member

I've just tried to reinstall a newer version of MDA onto an older computer and got the error below. This was using Cython 0.20.2.

It looks like trailing semicolons were fixed in 0.21:
http://trac.cython.org/ticket/832

And apparently our minimum required is 0.16.

So the fix seems easy enough, but really our builds should have caught this, so maybe what is also needed is for .travis.yml to install the minimum version of everything to check that our requirements still work. I'm not sure if this is a whole new build or not (minimal doesn't have Cython, so it wouldn't have been caught).

Attempting to autodetect OpenMP support... Compiler supports OpenMP
Compiling MDAnalysis/lib/c_distances.pyx because it changed.
Compiling MDAnalysis/lib/c_distances_openmp.pyx because it changed.
Compiling MDAnalysis/lib/qcprot.pyx because it changed.
Cythonizing MDAnalysis/lib/c_distances.pyx

Error compiling Cython file:
------------------------------------------------------------
...
    cdef int rows = len(coord)
    cdef double cutoff2 = cutoff ** 2
    cdef float[:, ::1] coord_view = coord

    cdef int i, j
    cdef double[3] rr;
                    ^
------------------------------------------------------------

MDAnalysis/lib/c_distances.pyx:271:21: Syntax error in C variable declaration
Traceback (most recent call last):
  File "setup.py", line 351, in <module>
    ext_modules=extensions(config),
  File "setup.py", line 312, in extensions
    extensions = cythonize(extensions)
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 798, in cythonize
    cythonize_one(*args[1:])
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 915, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: MDAnalysis/lib/c_distances.pyx
@kain88-de
Copy link
Member

we should then always only install the minimal requirements. But I honestly don't know how. Does PyPi save older versions of packages? As far as I can tell you can only always download the most current version on PyPi.

@richardjgowers
Copy link
Member Author

I was thinking we'd need a cutting edge and a minimum version build, so we'd be both future proof and past proof.

https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers

Looks possible to install specific versions too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants