-
Notifications
You must be signed in to change notification settings - Fork 809
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
AttributeError: module 'scipy.sparse' has no attribute 'csgraph' #39
Comments
I am a little puzzled by this -- scipy >= 0.19 does have that module according to the docs:
|
I agree, the following works fine: If I add the following, Probably my install is messed up. |
It could be an issue in how some commits got merged in. I'll take a look soon just in case. |
Thanks Leland
|
I have the same issue. Sorry, could you elaborate a little more on the solution that worked for you guys ? |
My understanding is that you should edit the file umap_.py to have
Along with the other imports. In practice it may be worth grabbing the latest version on master here and installing from that (after uninstalling the pip version). That should fix this issue, but as I can't actually reproduce it myself I can't know for sure. |
Thanks @lmcinnes, that trick indeed worked for me :) |
@arnaudmiribel and @amirsani, What system are you are using? Operating system w/ version and Python version. We might be able add to add them to the Travis CI test runs. Currently, it's a little sparse running only on conda with 3.6 and 2.7. |
Is this specific to Jupyter notebooks? I am on Ubuntu 16.04, python 3.5.2.
The code above works if I start python from the command line, but doesn't work in a Jupyter notebook. If i uncomment the import it works in the notebook. |
Hello, Yes. I was running on a Jupyter Notebook with Python 3.6.4 and Ubuntu 17.10.
I installed umap-learn on my other system without any problems. I accidentally installed umap, as I did the first time, and wondered if this was causing any problems? I removed it and reinstalled umap-learn to get everything working on the other system. |
Thanks for the info. Sounds like it could be Jupyter or Ubuntu related. One more question for both of you, are you using conda or pip to install everything? |
pip install umap-learn |
This looks like it's related to SciPy version 1.0.0. I assume it's working for SciPy version =< 0.19. I currently have SciPy version 1.0.0 (released October 25, 2017) installed via conda/pip and I also have this problem. This commit to SciPy a month ago adds back the import of It might be best to directly import |
I can confirm that I just ran into this using SciPy 1.0.0 and @wflynny has identified the fix for the compatibility regression. |
@sauln I am using OSX High Sierra 10.13.2 and Python 3.6.4 (Anaconda, Inc) |
New version now on PyPI should fix this. 0.2.1 or greater is what you should need if you are currently seeing this issue. |
You can maybe exclude scipy==1.0 in setup.py. |
@gokceneraslan Sounds like a reasonable plan ... I'm just not sure how to do that as I'm not much of an expert on packaging and the required semantics for doing that within setup.py. I believe the current version of PyPI should fix it as is, so hopefully that will suffice. |
Scipy 1.1.0 has release, so in ubuntu python 3.6.4 just |
Did this get resolved? |
I was having the exact same issue with scipy.
|
It should be resolved with the latest versions of scipy. Not sure why there are any lingering issues. |
Hello,
Thank you for the great contribution.
I can't seem to get it running. Any help is appreciated.
Here are my versions:
Running the example,
outputs:
But I can import csgraph witout problems from scipy,
from scipy.sparse import csgraph
The text was updated successfully, but these errors were encountered: