No module named ‘skimage‘的问题及解决
项目中执行 import torchxrayvision as xrv时出现以下错误:Traceback (most recent call last):File "D:/研究生/毕业设计/COVID19/COVID19_CT/conduct.py", line 14, in <module>import torchxrayvision as xrvFile "D:\研究生\毕业设计\
项目中执行 import torchxrayvision as xrv时出现以下错误:
Traceback (most recent call last):
File "D:/研究生/毕业设计/COVID19/COVID19_CT/conduct.py", line 14, in <module>
import torchxrayvision as xrv
File "D:\研究生\毕业设计\COVID19\COVID19_CT\torchxrayvision\__init__.py", line 1, in <module>
from . import datasets
File "D:\研究生\毕业设计\COVID19\COVID19_CT\torchxrayvision\datasets.py", line 3, in <module>
from skimage.io import imread, imsave
ModuleNotFoundError: No module named 'skimage'
既然是因为缺少skimage文件所引起的报错,那么我们就通过pip install scikit-image
命令来安装它。
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting scikit-image
Downloading https://mirrors.aliyun.com/pypi/packages/6e/c7/6411a4ce983bf06db8c3b8093b04b268c2580816f61156a5848e24e97118/scikit_image-0.17.2-cp37-cp37m-win_amd64.whl (11.5 MB)
|████████████████████████████████| 11.5 MB 6.4 MB/s
Collecting networkx>=2.0
Downloading https://mirrors.aliyun.com/pypi/packages/41/8f/dd6a8e85946def36e4f2c69c84219af0fa5e832b018c970e92f2ad337e45/networkx-2.4-py3-none-any.whl (1.6 MB)
|████████████████████████████████| 1.6 MB 6.4 MB/s
Collecting PyWavelets>=1.1.1
Downloading https://mirrors.aliyun.com/pypi/packages/87/e1/c3d97d145ce3377c53f1feca5742ca2b2a38c34dcbe301e2212de3cc654d/PyWavelets-1.1.1-cp37-cp37m-win_amd64.whl (4.2 MB)
|████████████████████████████████| 4.2 MB 3.3 MB/s
Collecting imageio>=2.3.0
Downloading https://mirrors.aliyun.com/pypi/packages/6e/57/5d899fae74c1752f52869b613a8210a2480e1a69688e65df6cb26117d45d/imageio-2.9.0-py3-none-any.whl (3.3 MB)
|████████████████████████████████| 3.3 MB 6.4 MB/s
Requirement already satisfied: numpy>=1.15.1 in d:\anaconda3\envs\pytorch_1.4_gpu\lib\site-packages (from scikit-image) (1.19.1)
Collecting tifffile>=2019.7.26
Downloading https://mirrors.aliyun.com/pypi/packages/3f/51/151f2c5b89af5a3ebbe9d1078ce598abeeb6802b6cf568350914746d1c4c/tifffile-2020.8.13-py3-none-any.whl (146 kB)
|████████████████████████████████| 146 kB ...
Requirement already satisfied: scipy>=1.0.1 in d:\anaconda3\envs\pytorch_1.4_gpu\lib\site-packages (from scikit-image) (1.5.2)
Collecting matplotlib!=3.0.0,>=2.0.0
Downloading https://mirrors.aliyun.com/pypi/packages/af/e9/921fb9895bfa8afd93515702ac57a4c63345333c9920d3d1b81f6330e9a2/matplotlib-3.3.1-cp37-cp37m-win_amd64.whl (8.5 MB)
|████████████████████████████████| 8.5 MB 6.4 MB/s
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in d:\anaconda3\envs\pytorch_1.4_gpu\lib\site-packages (from scikit-image) (7.2.0)
Collecting decorator>=4.3.0
Downloading https://mirrors.aliyun.com/pypi/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting kiwisolver>=1.0.1
Downloading https://mirrors.aliyun.com/pypi/packages/7e/e5/d8bd2d063da3b6761270f29038d2bb9785c88ff385009bf61589cde6e6ef/kiwisolver-1.2.0-cp37-none-win_amd64.whl (57 kB)
|████████████████████████████████| 57 kB 1.5 MB/s
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3
Downloading https://mirrors.aliyun.com/pypi/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 2.8 MB/s
Requirement already satisfied: certifi>=2020.06.20 in d:\anaconda3\envs\pytorch_1.4_gpu\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (2020.6.20)
Collecting python-dateutil>=2.1
Downloading https://mirrors.aliyun.com/pypi/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 3.3 MB/s
Collecting cycler>=0.10
Downloading https://mirrors.aliyun.com/pypi/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Requirement already satisfied: six>=1.5 in d:\anaconda3\envs\pytorch_1.4_gpu\lib\site-packages (from python-dateutil>=2.1->matplotlib!=3.0.0,>=2.0.0->scikit-image) (1.15.0)
Installing collected packages: decorator, networkx, PyWavelets, imageio, tifffile, kiwisolver, pyparsing, python-dateutil, cycler, matplotlib, scikit-image
Successfully installed PyWavelets-1.1.1 cycler-0.10.0 decorator-4.4.2 imageio-2.9.0 kiwisolver-1.2.0 matplotlib-3.3.1 networkx-2.4 pyparsing-2.4.7 python-dateutil-2.8.1 scikit-image-0.17.2 tifffile-2020.8
.13
问题解决。
更多推荐
所有评论(0)