yahoo / open_nsfw

Not Suitable for Work (NSFW) classification using deep neural network Caffe models.
BSD 2-Clause "Simplified" License
5.86k stars 1.05k forks source link

ImportError: No module named skimage.io #13

Closed fengjinhai closed 7 years ago

fengjinhai commented 7 years ago

hi, I install docker and Build a caffe docker image sucessfully, but is run the programm, it report the error. please help me.

root@iZ25q8sqgi7Z:~/open_nsfw# docker run caffe:cpu caffe --version libdc1394 error: Failed to initialize libdc1394 caffe version 1.0.0-rc3

root@iZ25q8sqgi7Z:~/open_nsfw# docker run --volume=$(pwd):/workspace caffe:cpu \

python ./classify_nsfw.py \ --model_def nsfw_model/deploy.prototxt \ --pretrained_model nsfw_model/resnet_50_1by2_nsfw.caffemodel \ test_image.jpg libdc1394 error: Failed to initialize libdc1394 Traceback (most recent call last): File "./classify_nsfw.py", line 16, in import caffe File "/opt/caffe/python/caffe/init.py", line 1, in from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver File "/opt/caffe/python/caffe/pycaffe.py", line 15, in import caffe.io File "/opt/caffe/python/caffe/io.py", line 2, in import skimage.io ImportError: No module named skimage.io

sdvdxl commented 7 years ago

run command pip install scikit-image

JeffreyYH commented 7 years ago

I used apt-get install and solved my problem. Run the following commands,

sudo apt-get install python-matplotlib python-numpy python-pil python-scipy

sudo apt-get install build-essential cython

sudo apt-get install python-skimage
Ashutosh1995 commented 7 years ago

Thanks a lot @JeffreyYafeiHu , it worked :+1:

vokhidovhusan commented 7 years ago

Thank you @JeffreyYafeiHu. it helped

bjce commented 6 years ago

Hello

I also have problem. When I run this command

from skimage import io
io.use_plugin("pil", "imread")
img = io.imread("/Users/mymac/Downloads/image.png")
io.use_plugin("qt", "imshow")
io.imshow(img,fancy=True)
io.show()

I get the following error message:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-24-8355b47d9c39> in <module>()
----> 1 io.use_plugin("qt", "imshow")
      2 io.imshow(img,fancy=True)
      3 io.show()

/anaconda3/lib/python3.6/site-packages/skimage/io/manage_plugins.py in use_plugin(name, kind)

/anaconda3/lib/python3.6/site-packages/skimage/io/manage_plugins.py in _load(plugin)

ModuleNotFoundError: No module named 'skimage.io._plugins.qt_plugin'
qianjun1987 commented 5 years ago

hi, I install docker and Build a caffe docker image sucessfully, but is run the programm, it report the error. please help me.

root@iZ25q8sqgi7Z:~/open_nsfw# docker run caffe:cpu caffe --version libdc1394 error: Failed to initialize libdc1394 caffe version 1.0.0-rc3

root@iZ25q8sqgi7Z:~/open_nsfw# docker run --volume=$(pwd):/workspace caffe:cpu \

python ./classify_nsfw.py --model_def nsfw_model/deploy.prototxt --pretrained_model nsfw_model/resnet_50_1by2_nsfw.caffemodel test_image.jpg libdc1394 error: Failed to initialize libdc1394 Traceback (most recent call last): File "./classify_nsfw.py", line 16, in import caffe File "/opt/caffe/python/caffe/init.py", line 1, in from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver File "/opt/caffe/python/caffe/pycaffe.py", line 15, in import caffe.io File "/opt/caffe/python/caffe/io.py", line 2, in import skimage.io ImportError: No module named skimage.io 直接

pip install scikit-image

jmjmjm123 commented 5 years ago

@qianjun1987 it helped ,thanks !

Bech007 commented 4 years ago

hi how install skimage on centos 7