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

使用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)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章