繁体   English   中英

安装 scikit-image 时如何解决此错误?

[英]How do i solve this error when installing scikit-image?

使用 pip 安装 scikit-image 时出现以下错误。 注意我已经安装了 Microsoft VS。 这是什么原因造成的? 不确定 numpy 是否有问题? 谢谢

ERROR: Command errored out with exit status 1:
 command: 'c:\users\student\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"'; __file__='"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Student\AppData\Local\Temp\pip-record-r78qb75l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\student\appdata\local\programs\python\python39\Include\scikit-image'
     cwd: C:\Users\Student\AppData\Local\Temp\pip-install-2dp2c1cs\scikit-
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\student\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"'; __file__='"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Student\AppData\Local\Temp\pip-record-r78qb75l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\student\appdata\local\programs\python\python39\Include\scikit-image' Check the logs for full command output.

根据 GitHub 上的这个问题,它在Python 3.9上仍然不可用。

他们提供了一些解决方案:

  • conda install -c conda-forge scikit-learn与 Conda
  • pip install --pre -U scikit-learn在 windows

对于 python==3.10.4:只需以管理员身份在 CMD 中升级 pip 命令,一切都会正常工作。

python -m pip install –-upgrade pip

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM