在Thonny安装Pyde时遇到了麻烦
我正在尝试安装库 PyDE
来对我所做的方程运行微分进化。每当我尝试在 thonny 中安装该库时,都会收到错误(如下所列)。
我不是最了解 pip 或错误含义的人,因此如果您能提供帮助,我将非常感激。
thonny 的 pip 窗口中的错误消息:
Collecting PyDE
Downloading PyDE-1.0.1.tar.gz (2.6 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\charlie\AppData\Local\Programs\Thonny\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\charlie\\AppData\\Local\\Temp\\pip-install-jraruxxv\\PyDE\\setup.py'"'"'; __file__='"'"'C:\\Users\\charlie\\AppData\\Local\\Temp\\pip-install-jraruxxv\\PyDE\\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 'C:\Users\charlie\AppData\Local\Temp\pip-pip-egg-info-wu08p02b'
cwd: C:\Users\charlie\AppData\Local\Temp\pip-install-jraruxxv\PyDE\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\charlie\AppData\Local\Temp\pip-install-jraruxxv\PyDE\setup.py", line 5, in <module>
with open('README.rst') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'README.rst'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Process returned with code 1
I'm trying to install the library PyDE
to run a differential evolution on an equation I've made. Whenever I try to install the library in thonny, I get an error (listed below).
I'm not the most knowledgeable with pip
or what the errors mean so if you can help out I'd really appreciate it.
The error message from thonny's pip window:
Collecting PyDE
Downloading PyDE-1.0.1.tar.gz (2.6 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\charlie\AppData\Local\Programs\Thonny\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\charlie\\AppData\\Local\\Temp\\pip-install-jraruxxv\\PyDE\\setup.py'"'"'; __file__='"'"'C:\\Users\\charlie\\AppData\\Local\\Temp\\pip-install-jraruxxv\\PyDE\\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 'C:\Users\charlie\AppData\Local\Temp\pip-pip-egg-info-wu08p02b'
cwd: C:\Users\charlie\AppData\Local\Temp\pip-install-jraruxxv\PyDE\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\charlie\AppData\Local\Temp\pip-install-jraruxxv\PyDE\setup.py", line 5, in <module>
with open('README.rst') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'README.rst'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Process returned with code 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
维护者忘记使用
setup.py
指令将README.rst
文件打包到tar.gz
存档中(很可能是 Python 包的源代码分发版) ,所以它失败了。手动下载存档,打开setup.py
删除函数读取README.rst
,然后手动安装。或者,从 GitHub 安装:
如果您想要精确版本,则没有适合您的分支或标签,但可能是 此提交 根据日期判断PyPI 包发布。在这种情况下,将
master
调整为提交哈希使用 GitHub 链接时它起作用的原因是因为 pip 将下载完整存储库的快照(zipball,其中包含
README.rst file) 而不是 PyPI 中损坏的存档(实际上没有)。
The maintainer forgot to package the
README.rst
file into thetar.gz
archive (Python package's source distribution most likely) withsetup.py
instructions, so it's failing. Download the archive manually, opensetup.py
remove the function reading theREADME.rst
and then install manually.Alternatively, install from GitHub:
If you want the exact version, there's no branch or tag for you, but it might be this commit judging by the date of the PyPI package release. In that case adjust the
master
to the commit hashThe reason why it works when using the GitHub link is because pip will download the full repository's snapshot (zipball, which contains the
README.rst
file) instead of the broken archive from PyPI (which does not).