使用pip3安装Skipage失败

2024-04-25 08:26:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图在我的Ubuntu虚拟机上安装“skimage”软件包,以分析图像与scikit图像的结构相似性。但我总是会犯一个奇怪的错误。我已经尝试用conda安装它,但也没有成功。康达似乎只知道“scikit图像”,而不知道“浏览”。所需的包,如numpy、matplotlib等。。。已安装并升级

我的意见:

pip3 install skimage

错误:

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-k9rh2ebf/skimage/pip-egg-info
         cwd: /tmp/pip-install-k9rh2ebf/skimage/
    Complete output (3 lines):
    
    *** Please install the `scikit-image` package (instead of `skimage`) ***
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


谢谢你的帮助!

Tags: installpippy图像infoegg错误setup
3条回答

经过多次尝试,我终于发现这与我使用的虚拟机有关。在我下载的VirtualBox的预构建Ubuntu映像中,安装路径似乎有问题。 设置一个本地Ubuntu(没有VM)为我解决了这个问题。skimage库为空,仅指向sicikit映像库,通常随scikit映像的安装一起安装(由于VM的原因,该映像无法工作)。 现在在我的原生ubuntu上,一切都正常工作了

您可以使用 pip install -U scikit-image或此pip install scikit-image

查看documentation以便安装它,您需要使用以下命令

pip install scikit-image

如果你想用skimage这个词来安装它

sudo apt-get install python-skimage

相关问题 更多 >