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

Installing scikit-image fails to install scipy, even though it requires it #5403

Closed
cowlinator opened this issue May 21, 2021 · 6 comments
Closed

Comments

@cowlinator
Copy link

Description

Installing scikit-image 0.16.2 does not install scipy, even though it requires scipy.

Way to reproduce

"C:\Program Files\Python39\python.exe" -m venv venv39_temp1
venv39_temp1\Scripts\activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install scikit-image==0.16.2
python -c "from skimage.metrics import structural_similarity"

Output from reproduction steps

D:\Dev\1>"C:\Program Files\Python39\python.exe" -m venv venv39_temp1

D:\Dev\1>venv39_temp1\Scripts\activate

(venv39_temp1) D:\Dev\1> python -m pip install --upgrade pip setuptools wheel
Collecting pip
  Using cached pip-21.1.1-py3-none-any.whl (1.5 MB)
Collecting setuptools
  Using cached setuptools-56.2.0-py3-none-any.whl (785 kB)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, setuptools, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed pip-21.1.1 setuptools-56.2.0 wheel-0.36.

(venv39_temp1) D:\Dev\1>python -m pip install scikit-image==0.16.2
Collecting scikit-image==0.16.2
  Using cached scikit_image-0.16.2-cp39-cp39-win_amd64.whl
Collecting imageio>=2.3.0
  Using cached imageio-2.9.0-py3-none-any.whl (3.3 MB)
Collecting pillow>=4.3.0
  Using cached Pillow-8.2.0-cp39-cp39-win_amd64.whl (2.2 MB)
Collecting PyWavelets>=0.4.0
  Using cached PyWavelets-1.1.1-cp39-cp39-win_amd64.whl (4.2 MB)
Collecting networkx>=2.0
  Using cached networkx-2.5.1-py3-none-any.whl (1.6 MB)
Collecting numpy
  Using cached numpy-1.20.3-cp39-cp39-win_amd64.whl (13.7 MB)
Collecting decorator<5,>=4.3
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Installing collected packages: pillow, numpy, decorator, PyWavelets, networkx, imageio, scikit-image
Successfully installed PyWavelets-1.1.1 decorator-4.4.2 imageio-2.9.0 networkx-2.5.1 numpy-1.20.3 pillow-8.2.0 scikit-image-0.16.2

(venv39_temp1) D:\Dev\1>python -c "from skimage.metrics import structural_similarity"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Dev\1\venv39_temp1\lib\site-packages\skimage\metrics\__init__.py", line 1, in <module>
    from ._adapted_rand_error import adapted_rand_error
  File "D:\Dev\1\venv39_temp1\lib\site-packages\skimage\metrics\_adapted_rand_error.py", line 2, in <module>
    from ._contingency_table import contingency_table
  File "D:\Dev\1\venv39_temp1\lib\site-packages\skimage\metrics\_contingency_table.py", line 1, in <module>
    import scipy.sparse as sparse
ModuleNotFoundError: No module named 'scipy'

Version information

# Paste the output of the following python commands
from __future__ import print_function
import sys; print(sys.version)
import platform; print(platform.platform())
import skimage; print("scikit-image version: {}".format(skimage.__version__))
import numpy; print("numpy version: {}".format(numpy.__version__))
3.9.4 (tags/v3.9.4:1f2e308, Apr  6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
Windows-10-10.0.18362-SP0
scikit-image version: 0.16.2
numpy version: 1.20.3

Why am I using version 0.16.2 ?

As a workaround to this issue in version 0.18: #4780 (comment)

@hmaarrfk
Copy link
Member

Unfortunately, scikit-image 0.16.2 is neither currently supported, nor was it ever supported for installation on Python 3.9.

Is there a particular reason you need scikit-image 0.16.2 instead of updating to the latest version?

@cowlinator
Copy link
Author

Why am I using version 0.16.2 ?

As a workaround to this issue in version 0.18: #4780 (comment)

@cowlinator
Copy link
Author

@hmaarrfk , also, where is it documented which versions of scikit-image support which versions of Python?

Setup.py lists in 2 places that 0.16.2 has forward-compatibility for all versions of python greater than 3.6.

https://github.com/scikit-image/scikit-image/blob/v0.16.2/setup.py#L41

https://github.com/scikit-image/scikit-image/blob/v0.16.2/setup.py#L233

@hmaarrfk
Copy link
Member

we should probably be more explicit.

it is "greater than 3.6 [at the time of writing]".

I typically check for compatibility by looking at the files available on pypi

They should be avaiable for your version of python
https://pypi.org/project/scikit-image/#files

@mkcor
Copy link
Member

mkcor commented Jul 15, 2021

Dear @cowlinator,

Were you able to resolve your install issue?

@scikit-image scikit-image locked and limited conversation to collaborators Oct 18, 2021
@grlee77
Copy link
Contributor

grlee77 commented Feb 20, 2022

moving from discussion back to issues, but leaving closed due to lack of feedback

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

No branches or pull requests

5 participants