MXnet:Traceback (most recent call last): File "run.py", line 9, in <module> from skimage.restoration

来源:互联网 发布:佳能 eos utility mac 编辑:程序博客网 时间:2024/04/29 16:58

使用MXnet中的neural art时,运行“python run.py --content-image input/IMG_4343.jpg --style-image input/starry_night.jpg”指令时出现如下错误:

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


解决方案:运行如下命令

(1)sudo apt-get remove python-skimage

(2)conda install opencv

(3)conda install scikit-image


如果conda命令未找到情况,则需要安装Anaconda。方法如下:

(1)从https://www.continuum.io/downloads 下载相应的安装文件 我是使用Ubuntu 64位、Python 2.7 因此下载Anaconda2-2.5.0-Linux-x86_64.sh

(2)chmod 777 Anaconda2-2.5.0-Linux-x86_64.sh

(3)./Anaconda2-2.5.0-Linux-x86_64.sh 按步骤安装好,这样就可以用了

         (如果你是用.zshrc,则需要在其中加环境变量export PATH="/自己的路径/anaconda2/bin:$PATH",再source ~/.zshrc)

0 0