Collecting scikit-image==0.12.3 Using cached scikit-image-0.12.3.tar.gz (20.7 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [5 lines of output] To install scikit-image from source, you will need numpy. Install numpy with pip: pip install numpy Or use your operating system package manager. For more details, see http://scikit-image.org/docs/stable/install.html [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip
时间: 2023-07-02 21:24:15 浏览: 199
根据出现的错误信息,您需要先安装 NumPy 库,然后再安装 scikit-image 库。您可以使用以下命令来安装 NumPy 库:
```
pip install numpy
```
安装完成后,您可以再次尝试安装 scikit-image 库:
```
pip install scikit-image==0.12.3
```
如果您仍然遇到问题,建议您查看 scikit-image 的官方安装指南,以确保您的环境符合所需条件。
相关问题
pip install --use-pep517 scikit-image==0.12.3 Defaulting to user installation because normal site-packages is not writeable Collecting scikit-image==0.12.3 Using cached scikit-image-0.12.3.tar.gz (20.7 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1
这个错误是由于缺少依赖项导致的。你可以尝试以下步骤来解决这个问题:
1. 确保你的pip版本是最新的,可以运行以下命令升级pip:
```
pip install --upgrade pip
```
2. 确保你的setuptools版本是最新的,可以运行以下命令升级setuptools:
```
pip install --upgrade setuptools
```
3. 安装scikit-image的所有依赖项,可以运行以下命令:
```
pip install numpy scipy matplotlib pillow six
```
4. 然后再次尝试安装scikit-image:
```
pip install --use-pep517 scikit-image==0.12.3
```
如果你还是遇到问题,可以尝试在安装命令中添加--no-cache-dir选项,例如:
```
pip install --use-pep517 scikit-image==0.12.3 --no-cache-dir
```
这将防止pip使用缓存,有时可以解决一些奇怪的安装问题。
Collecting scikit-image==0.12.3 Downloading scikit-image-0.12.3.tar.gz (20.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.7/20.7 MB 3.0 MB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [5 lines of output] To install scikit-image from source, you will need numpy. Install numpy with pip: pip install numpy Or use your operating system package manager. For more details, see http://scikit-image.org/docs/stable/install.html [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip.
这个错误提示显示安装scikit-image 0.12.3过程中出现了问题,可能是由于依赖项没有正确安装导致的。
首先,按照提示安装NumPy库:
```
pip install numpy
```
然后,再重新尝试安装scikit-image 0.12.3:
```
pip install scikit-image==0.12.3
```
如果仍然遇到问题,建议尝试使用Anaconda或Miniconda等包管理器来安装这些科学计算库,这些包管理器可以更好地处理依赖关系。
阅读全文