[英]skimage is not defined in jupyter notebook despite having installed the module
I created a virtual environment and installed scikitimage but when i use jupyter notebook it says no modules named skimage.我创建了一个虚拟环境并安装了 scikitimage,但是当我使用 jupyter notebook 时,它说没有名为 skimage 的模块。
I installed scikitimage without using virtual enviroment but still jupyter can't find it.我在没有使用虚拟环境的情况下安装了 scikitimage,但 jupyter 仍然找不到它。
from skimage import color, io
def load(image_path):
out = image_path
out = skimage.io.imread(image_path)
pass
image1 = load(image1_path)
NameError Traceback (most recent call last)
<ipython-input-3-08b9c4b0aed1> in <module>
----> 1 image1 = load(image1_path)
2 image2 = load(image2_path)
3
4 display(image1)
5 display(image2)
~\Suleman\imageOperations.py in load(image_path)
21 ### YOUR CODE HERE
22 # Use skimage io.imread
---> 23 out = skimage.io.imread(image_path)
24 pass
25 ### END YOUR CODE
NameError: name 'skimage' is not defined
first of all you need to uninstall scikit-image
.Then首先你需要卸载scikit-image
。然后
install it via shell/command prompt:通过 shell/命令提示符安装它:
pip install scikit-image
If you are running Anaconda or miniconda, open anaconda prompt then run this如果您正在运行 Anaconda 或 miniconda,请打开 anaconda 提示符然后运行此
conda install -c conda-forge scikit-image
if these steps aren't working upgrade your pip using如果这些步骤不起作用,请使用升级您的 pip
python -m pip install –upgrade pip
then follow again from step 1 to 3 that I have mentioned然后再次从我提到的第 1 步到第 3 步进行操作
If these aren't work uninstall scikit-image
from both pip
and conda
then try this in anaconda prompt如果这些都不起作用,请从pip
和conda
卸载scikit-image
,然后在 anaconda 提示符下尝试此操作
conda config --add channels conda-forge
conda install scikit-image
conda search scikit-image --channel conda-forge
pip install scikit-image
in the CMD window类型pip install scikit-image
py
in the CMD window在 CMD window 中键入py
import skimage
import skimage
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.