【问题标题】:How to use egg to install scikit-image?如何使用 egg 安装 scikit-image?
【发布时间】:2020-01-12 21:20:52
【问题描述】:

我被困在这个 scikit-image(又名 skimage)的安装上。我尝试了多种方法:

  • 从 git hub 文件夹安装(使用 requirements.txt)
  • whl file 安装
  • 使用 pip install scikit-image 安装

导入期间所有三个试验都失败了:import skimage

ImportError: cannot import name 'geometry'
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 

我浏览了互联网,但没有找到除上述解决方案之外的解决方案。 以前有人经历过吗? 一种可能性似乎是使用 -egg 进行 pip 安装,但我发现它适用于 Mac 而不是 Windows。

编辑:

大家好,所以我找到了一个解决方案,但这有点难,我仍然不明白为什么它以前不起作用。

我只是:

  • 卸载 anaconda
  • 卸载python
  • 安装 python (3.8)
  • 安装 Anaconda(我现在在使用 Spyder 时遇到问题^^)

【问题讨论】:

  • 如果没有使用上述方法的特定要求,您可以轻松使用Anaconda 安装skimage。
  • @B200011011 你的意思是安装 Anaconda 和 scikit 镜像会出现?我在提出问题后学会了这种方法,但现在我卸载并重新安装了我无法让 Anaconda 工作
  • 请检查我下面的回答是否有帮助。

标签: python windows installation scikit-image


【解决方案1】:

如果你想为computer vision/Image processing/machine learning任务编写代码,那么可以很容易地在带有conda环境的pycharm中完成。 无需单独安装 python 来运行 Anaconda。

首先,下载并安装pycharm。接下来,如果您使用 Windows 则从这里下载Anaconda 64 bit python 3.7 版本, https://www.anaconda.com/distribution/#windows

您可以在此处找到有关管理环境和有用链接的一些详细信息, How to create some environments for tensorflow in anaconda?

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

首先使用 Anaconda Prompt 命令行创建一个 conda 环境,

conda create -n cvenv python=3.7

现在使用激活该环境。默认情况下,base 是激活的。

conda activate cvenv

接下来,安装你想要的包,

conda install -c conda-forge scikit-learn
conda install -c conda-forge scikit-image
conda install -c conda-forge pillow
conda install -c conda-forge opencv

我使用conda-forge 软件包,因为它们是较新的。最后,打开pycharm,在conda环境中选择已有的python解释器新建一个项目。如果不存在则选择,

Browse > Add Python Interpreter > Conda Environment > Interpreter > Browse > Anaconda3 installation folder > envs folder > cvenv folder > Python.exe 

你可以通过创建一个python文件并写import skimage来测试。

【讨论】:

    猜你喜欢
    • 2017-04-21
    • 2018-08-03
    • 1970-01-01
    • 1970-01-01
    • 2019-09-12
    • 2017-12-05
    • 2021-03-25
    • 2022-07-27
    相关资源
    最近更新 更多