在做對比實驗中,需要對比RCAN的論文結果,從GitHub上下載源碼以後對論文進行復現。論文只支持python==3.6,Torch==0.4.1, torchvision=0.2.1,所以我在復現時候重建新的環境了。這裏建議是重建新的環境,要不然改動很多,嘗試一次失敗告終。爲了避免了很多麻煩,在其他安裝包的時候出現了很多問題,這裏一一列舉。
-
ImportError: cannot import name 'PILLOW_VERSION' from 'PIL'
解決方案:
方法1.卸載PIL模塊,重新安裝,安裝7.0.0之前的版本,使用conda prompt 中的命令行
conda uninstall Pillow
conda install Pillow=6.0.0
-
AttributeError: module 'scipy.misc' has no attribute 'imread'
經過查詢和嘗試,發現是
scipy
的版本問題, 降級到scipy==1.2.1
就可以完美解決了。
pip install scipy==1.2.1