Scikit-image: (Windows 10) import skimage.io or skimage does not work.

Created on 18 Jan 2018  Â·  37Comments  Â·  Source: scikit-image/scikit-image

I'm using Anaconda Prompt.
using the latest version of scikit-image:

# All requested packages already installed.
# packages in environment at C:\Users\root\Anaconda2\envs\caffe:
#
scikit-image              0.13.1           py27h0c8e037_1

and heres the full error I get:

File "C:\Users\root\caffe\python\caffe\io.py", line 2, in <module>
    import skimage.io
ImportError: No module named skimage.io

Most helpful comment

@soupault I updated the response.

All 37 comments

Please make sure you activated the environment before running your script. The problem is that the module cannot be found, i.e. is not installed in the Python that your script executes.

@stefanv oh so sorry, forgot to mention that I do activate it.

@mineo210 you have to check if you PYTHONPATH is correctly set when running io.py. Add:

import sys
print(sys.path)

at the beggining of the file, and run it once again.

Then check is there is scikit-image installation in any of those directories.

@soupault Ok I think I got it. should I change my PYTHONPATH to this?

PYTHONPATH=C:\Users\root\caffe\python;C:\Users\root\Anaconda2

I don't get it.. it's set up right but I still get the error

(caffe) C:\Users\root\DeepDreamAnim>python C:\Users\root\caffe\python\caffe\io.py
['C:\\Users\\root\\caffe\\python\\caffe', 'C:\\Users\\root\\caffe\\python', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\python27.zip', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\DLLs', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\plat-win', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\lib-tk', 'C:\\Users\\root\\Anaconda2\\envs\\caffe', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\Babel-2.5.0-py2.7.egg', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\win32', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\win32\\lib', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\Pythonwin']
['C:\\Users\\root\\caffe\\python\\caffe', 'C:\\Users\\root\\caffe\\python', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\python27.zip', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\DLLs', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\plat-win', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\lib-tk', 'C:\\Users\\root\\Anaconda2\\envs\\caffe', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\Babel-2.5.0-py2.7.egg', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\win32', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\win32\\lib', 'C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages\\Pythonwin']
Traceback (most recent call last):
  File "C:\Users\root\caffe\python\caffe\io.py", line 3, in <module>
    import numpy as np
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import add_newdocs
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
    from .type_check import *
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\core\__init__.py", line 74, in <module>
    from numpy.testing import _numpy_tester
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\testing\__init__.py", line 12, in <module>
    from . import decorators as dec
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\testing\decorators.py", line 6, in <module>
    from .nose_tools.decorators import *
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\testing\nose_tools\decorators.py", line 20, in <module>
    from .utils import SkipTest, assert_warns
  File "C:\Users\root\Anaconda2\envs\caffe\lib\site-packages\numpy\testing\nose_tools\utils.py", line 15, in <module>
    from tempfile import mkdtemp, mkstemp
  File "C:\Users\root\Anaconda2\envs\caffe\lib\tempfile.py", line 32, in <module>
    import io as _io
  File "C:\Users\root\caffe\python\caffe\io.py", line 4, in <module>
    import skimage.io
ImportError: No module named skimage.io

I think this one is your Python env - C:\\Users\\root\\Anaconda2\\envs\\caffe\\, and this is where scikit-image has to be installed - C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages.

You should check if the library is presented there, and, if so, try to manually remove and install again. If not, just install, of course :).

@soupault alright I looked in C:\\Users\\root\\Anaconda2\\envs\\caffe\\lib\\site-packages and there is no library called scikit-image or skimage and strangely enough when I try to install scikit-image it says its already installed..

(caffe) C:\Users\root>conda install scikit-image
Fetching package metadata .............
Solving package specifications: .

# All requested packages already installed.
# packages in environment at C:\Users\root\Anaconda2\envs\caffe:
#
scikit-image              0.13.1           py27h0c8e037_1

UPDATE: I solved it.. it was a bug in the code.

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Dell\AppData\Local\Temp\pip-install-2lot2tfu\skimage\

i am unable install skimage in my system
i have window 10

@faoisal have you tried to use pre-build wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image ?

ys i have done it but still not executing

C:\Users\Dell\Downloads>pip install scikit-image
Requirement already satisfied: scikit-image in d:\python\lib\site-packages (0.13.1)
Requirement already satisfied: networkx>=1.8 in d:\python\lib\site-packages (from scikit-image) (2.1)
Requirement already satisfied: PyWavelets>=0.4.0 in d:\python\lib\site-packages (from scikit-image) (0.5.2)
Requirement already satisfied: six>=1.7.3 in d:\python\lib\site-packages (from scikit-image) (1.11.0)
Requirement already satisfied: pillow>=2.1.0 in d:\python\lib\site-packages (from scikit-image) (5.1.0)
Requirement already satisfied: decorator>=4.1.0 in d:\python\lib\site-packages (from networkx>=1.8->scikit-image) (4.3.0)
Requirement already satisfied: numpy>=1.9.1 in d:\python\lib\site-packages (from PyWavelets>=0.4.0->scikit-image) (1.14.3)

C:\Users\Dell\Downloads>pip install scikit_image-0.13.1-cp36-cp36m-win_amd64.whl
Requirement already satisfied: scikit-image==0.13.1 from file:///C:/Users/Dell/Downloads/scikit_image-0.13.1-cp36-cp36m-win_amd64.whl in d:\python\lib\site-packages (0.13.1)
Requirement already satisfied: PyWavelets>=0.4.0 in d:\python\lib\site-packages (from scikit-image==0.13.1) (0.5.2)
Requirement already satisfied: pillow>=2.1.0 in d:\python\lib\site-packages (from scikit-image==0.13.1) (5.1.0)
Requirement already satisfied: six>=1.7.3 in d:\python\lib\site-packages (from scikit-image==0.13.1) (1.11.0)
Requirement already satisfied: networkx>=1.8 in d:\python\lib\site-packages (from scikit-image==0.13.1) (2.1)
Requirement already satisfied: numpy>=1.9.1 in d:\python\lib\site-packages (from PyWavelets>=0.4.0->scikit-image==0.13.1) (1.14.3)
Requirement already satisfied: decorator>=4.1.0 in d:\python\lib\site-packages (from networkx>=1.8->scikit-image==0.13.1) (4.3.0)

@faoisal Try this:

pip install --upgrade --force-reinstall scikit_image-0.13.1-cp36-cp36m-win_amd64.whl

i have tried it is installed
i want to make some shapes and trying to command this

why skimage is not working

@faoisal - I'm afraid it's very difficult to guess what problem you are having, from your description. Can you give some details about exactly what you are trying to do?

For example, what happens if you do this:

Start Python from the command prompt:


Then, at the Python prompt:

>>> import skimage

If that gives an error, please post it.

i want to draw some shapes
i entered >>> import skimage, its ok
what to do next

i am entering
from skimage.draw import (line, polygon, circle,
circle_perimeter,
ellipse, ellipse_perimeter,
bezier_curve)

i am entering below
from skimage.draw import (line, polygon, circle,
circle_perimeter,
ellipse, ellipse_perimeter,
bezier_curve)

error comes

Traceback (most recent call last):
File "D:/python/p1.py", line 5, in
from skimage.draw import (line)
File "D:pythonlibsite-packagesskimagedraw__init__.py", line 5, in

from .draw3d import ellipsoid, ellipsoid_stats
File "D:pythonlibsite-packagesskimagedrawdraw3d.py", line 3, in

from scipy.special import (ellipkinc as ellip_F, ellipeinc as ellip_E)
ModuleNotFoundError: No module named 'scipy'

Regards
Faisal Siddique
Phd Student
Technical University of Liberec
Czech Republic

On Wed, May 23, 2018 at 2:00 PM, Matthew Brett notifications@github.com
wrote:

@faoisal https://github.com/faoisal - I'm afraid it's very difficult to
guess what problem you are having, from your description. Can you give some
details about exactly what you are trying to do?

For example, what happens if you do this:

Start Python from the command prompt:

python

Then, at the Python prompt:

import skimage

If that gives an error, please post it.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/scikit-image/scikit-image/issues/2942#issuecomment-391321132,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AluSnVcCIKpf9nHG1PK_JQZaOR0r1tCCks5t1U9TgaJpZM4RiQMm
.

Try pip install scipy

hi i am trying to resolve this equation, the problem error is can't
multiply sequence by non-int of type 'str'

commands details are

import math
force_F= 13.85
area_A=0.0014276
circumferene_C=23.0
epsilon_e=0.323
length_d=30.84
P=(["force_F",
"2.0","3.14","7500.62","length_d"])/(["area_A""circumferene_C"*"epsilon_e"])

Regards
Faisal Siddique
Phd Student
Technical University of Liberec
Czech Republic

On Wed, May 23, 2018 at 2:12 PM, Matthew Brett notifications@github.com
wrote:

Try pip install scipy

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/scikit-image/scikit-image/issues/2942#issuecomment-391324093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AluSnX4ibhUF2tAllRVlNjGwrTI9w28_ks5t1VIWgaJpZM4RiQMm
.

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon
Virus-free.
www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

@matthew-brett I got same error I tried a lot of solutions but they did not solve my problem

>>>import skimage

Traceback (most recent call last):
File "", line 1, in
import skimage
ModuleNotFoundError: No module named 'skimage'

I tried conda and pip options
what should I do?

@faoisal why do you have all the quotes and list operators around everything? Try:

P=(force_F*2.0*3.14*7500.62*length_d)/(area_A*circumferene_C*epsilon_e)

@ysrsy what do you mean you "tried conda and pip"? scikit-image is in conda (including the latest release), so if you have conda you should be able to "conda install scikit-image" and then:

$ python
[python header]
>>> import skimage

"pyshell" is interesting — are you using a non-conda version of Python? Then conda install will not work for that version. You can have many versions of Python on a system, and when you install a package it only installs it for the "currently active" version. As an analogy, you can have multiple browsers (Firefox, Chrome) on your system, and installing an extension such as AdBlock on one does not install it for the other.

@jni I already used idle before anaconda can it be problem ?

@ysrsy yes. In a Windows command prompt, you can type where python to see which Python you are currently running. I bet it is the IDLE version instead of the Anaconda version. To get the Anaconda version, launch your programs from Anaconda Prompt.

Hi,
I also faced with this issue. I installed scikit-image 0.14.0 and can not import skimage to my project. I'm running windows 10 build 17763. Does anyone can help?

@trungnghiatn could you provide any extra information (how you installed scikit-image, whether you are using virtualenv or not, etc)?

Also please tell us which version of Python you are running (e.g., Python.org, Anaconda, etc.).

what command do you use to install skimage in anaconda? i cant find a conda install command for that

Conda install scikit-image

Conda install scikit-image

this works for me

When I was using scikit-image==0.16.2 and I tried to use
import skimage
and then tried to do
skimage.io.imread()
I got the error message
AttributeError: module 'skimage' has no attribute 'io'
and I solved this problem by using this instead:
import skimage.io

If that doesn't work, try doing
pip install scikit-image==0.14.2

The most up to date version was
scikit-image==0.16.2, but using import skimage followed by skimage.io.imread() would case an error of AttributeError: module 'skimage' has no attribute 'io' but in scikit-image==0.14.2 it did work.

I had problems with importing the io module

@ChristopherRSettles could you share an error message with us?

@soupault I updated the response.

Hi
i wana open landsat bands but i dont get any answer from my code
these are my codes:
import skimage as skm
import matplotlib.pyplot as plt
import numpy as np
blue = skm.io.imread("adress")
blue.shape

The original issue and discussion date back to 2018.

Please open a new issue and provide us with the image you are trying to open.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexdesiqueira picture alexdesiqueira  Â·  33Comments

AetherUnbound picture AetherUnbound  Â·  34Comments

sciunto picture sciunto  Â·  30Comments

vrjgamer picture vrjgamer  Â·  33Comments

paugier picture paugier  Â·  35Comments