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

scipy.weave depreacted #5

Closed
hkennyv opened this issue Jan 20, 2020 · 3 comments
Closed

scipy.weave depreacted #5

hkennyv opened this issue Jan 20, 2020 · 3 comments

Comments

@hkennyv
Copy link

hkennyv commented Jan 20, 2020

It looks like weave was deprecated in scipy and moved to its own project.

  File "/Users/khuynh/stackoverflow/pyi/venv/lib/python2.7/site-packages/MDAnalysis/analysis/distances.py", line 31, in <module>
    from scipy import weave
ImportError: cannot import name weave

I was able to resolve this quickly by

  1. installing weave via pip install weave
  2. editing the file in scipy at venv/lib/python2.7/site-packages/MDAnalysis/analysis/distances.py

and changing:

import numpy
from scipy import sparse
from scipy import weave
from scipy.weave import converters

to:

import numpy
from scipy import sparse
#  from scipy import weave
#  from scipy.weave import converters

import weave
from weave import converters

is there a more elegant way to do this? i don't think modifying the source of scipy is the most graceful way.. open to suggestions? :)

I've also written a stackoverflow answer for this here.

@mtiberti
Copy link
Contributor

Hi,
thanks for your efforts! Alternatively, you can simply comment out the offending line in libinteract (line 2), I just realised it's a stray import and imported function is not actually used in the code. I'll add this to the list of fixes - we are planning on releasing a Py3 compatible version which uses the latest MDAnalysis as well and will make things much simpler - stay tuned!

@hkennyv
Copy link
Author

hkennyv commented Jan 21, 2020

Thank you and thanks for your work too, I look forward to seeing the py3 release! Is it worth submitting a PR to fix this in the 2.7 version or is development here halted?

@elenapapaleo
Copy link
Contributor

We have now the py3 release here: https://github.com/ELELAB/pyinteraph2

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

No branches or pull requests

3 participants