Incubator-mxnet: ImpportError: No module named skimage when running Neural-style example

Created on 4 Jan 2016  路  10Comments  路  Source: apache/incubator-mxnet

I followed this article and installed everything on a AWS EC2 instance and I have a CUDA enable device with CUDNN installed. I can run the train_mnist both with CPU and GPU.

System Info:

Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

However, whenever I try to run the Neural-style example:

python run.py --content-image input/IMG_4343.jpg --style-image input/starry_night.jpg

I always get:

libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
  File "run.py", line 8, in <module>
    from skimage import io, transform
ImportError: No module named skimage

I have tried to install the python-skimage like so

sudo apt-get install python-skimage

And tried to run the example again. This time I get:

libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
  File "run.py", line 9, in <module>
    from skimage.restoration import denoise_tv_chambolle
ImportError: No module named restoration

How can I fix that?

Most helpful comment

maybe your skimage version is too old.
you can just try
#pip install scikit-image --upgrade

All 10 comments

Ok I don't know what happened:

I removed python-skimage:

sudo apt-get remove python-skimage

and the I installed miniconda2 and from there I did

conda install opencv 
conda install scikit-image

And it is working now

maybe your skimage version is too old.
you can just try
#pip install scikit-image --upgrade

Hi, I have the same problem.

`Python 2.7.10 (default, Feb  6 2017, 23:53:20) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import generate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "generate.py", line 8, in <module>
    import skimage.transform
ImportError: No module named skimage.transform`

I upgrade scikit-image and still same error.

like me :( ... got the same ...

the same issue, the latest scikit-image installed but ImportError.

Any updates on this? Anyone got a solution? I got the very same error. I installed scikit-image, latest version, but I still get an ImportError. Help would be greatly appreciated!

@ipa-srd-rd

My situation:

OS: Mac OSX

Issue:

  • OSX default python 2.7.10, /usr/bin.
  • python 3.6.15, /usr/local/Cellar/python/3.6.5/bin.
  • scikit-image installed in python 3.6.15 environment.

I manage the two version with pyenv and pyenv-virtualenv, but I did a mistake:
Suppose the program test.py, I assign the interpreter with !#/usr/bin/python, then use pyenv switch to py3 environment, execute the command ./test.py. Note that I run python 2.7.10 interpreter in python 3.6.15 environment, ImportError Inevitably!

The solution:

delete the first line !#/usr/bin/python , run python test.py in py3 (python 3.6.15 envrionment).

from skimage import transform

i got the same problem, how deal with it???

Maybe you are working on wrong environments.
Use which python or python --version and figure out your python environment.
Also do the same for your pip. which pip and pip --version. you will figure out where does your pip command install the requested package. You might have to use pip3 or pip2 in order to get things done.
I'm not sure whether you can use the which on windows. It's fine in Linux.

Was this page helpful?
0 / 5 - 0 ratings