简体   繁体   English

安装 package numcodecs 时出错。 我该怎么办?

[英]Error when installing the package numcodecs. What do I do?

I ran this command:我运行了这个命令:

pip install numcodecs 

And I got this error:我得到了这个错误:

Error: Command errored out with exit status 1: 'c:\users\sunit\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sunit\\AppData\\Local\\Temp\\pip-install-419pmst9\\numcodecs\\setup.py'"'"'; __file__='"'"'C:\\Users\\sunit\\AppData\\Local\\Temp\\pip-install-419pmst9\\numcodecs\\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\sunit\AppData\Local\Temp\pip-record-5lw96050\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\sunit\appdata\local\programs\python\python38\Include\numcodecs' Check the logs for full command output.

What do I do?我该怎么办?

I had the same error (trying to install zarr module, with the error coming from installing numcodecs).我有同样的错误(尝试安装 zarr 模块,错误来自安装 numcodecs)。 I was able to resolve it by updating my OSX to the newest version (Catalina), which then led to me reinstalling anaconda, Xcode, and previous Python packages from scratch.我能够通过将我的 OSX 更新到最新版本 (Catalina) 来解决它,这导致我从头开始重新安装 anaconda、Xcode 和以前的 ZA7F5F35426B927411FC9231B563827 包。 After doing that,做完之后,

pip install numcodecs

still failed with the same error.仍然失败并出现同样的错误。 However,然而,

conda install numcodecs

or in my case:或者在我的情况下:

conda install zarr

worked without error.工作没有错误。 It seems to have something to do with a conflict between Xcode tools and pip installer, which conda overcomes.这似乎与 Xcode 工具和 pip 安装程序之间的冲突有关,conda 克服了这种冲突。 My colleague was likewise unable to install via pip but could install via conda and a virtual environment on the first try, a faster option to try first before reinstalling everything.我的同事同样无法通过 pip 安装,但可以在第一次尝试时通过 conda 和虚拟环境安装,这是在重新安装所有内容之前先尝试的更快选择。

Brief discussion of the issue on Github here .这里简要讨论 Github 上的问题。

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

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