【发布时间】:2020-08-05 16:06:40
【问题描述】:
我尝试在我的外部 debian 服务器上安装不和谐库
python3 -m pip install -U git+https://github.com/Rapptz/discord.py.git
返回是:
[...]Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-oq4dl632/websocketsStoring debug log for failure in /root/.pip/pip.log
完整输出:
Downloading/unpacking git+https://github.com/Rapptz/discord.py.git
Cloning https://github.com/Rapptz/discord.py.git to /tmp/pip-vu76dg6y-build
Running setup.py (path:/tmp/pip-vu76dg6y-build/setup.py) egg_info for package from git+https://github.com/Rapptz/discord.py.git
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
Downloading/unpacking aiohttp>=3.6.0,<3.7.0 (from discord.py==1.4.0a2308-ge473f3c)
Downloading aiohttp-3.6.2-py3-none-any.whl (441kB): 441kB downloaded
Downloading/unpacking websockets>=6.0,!=7.0,!=8.0,!=8.0.1,<9.0 (from discord.py==1.4.0a2308-ge473f3c)
Downloading websockets-8.1.tar.gz (58kB): 58kB downloaded
Running setup.py (path:/tmp/pip-build-ayxt1lcn/websockets/setup.py) egg_info for package websockets
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-ayxt1lcn/websockets/setup.py", line 12, in <module>
long_description = (root_dir / 'README.rst').read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-ayxt1lcn/websockets/setup.py", line 12, in <module>
long_description = (root_dir / 'README.rst').read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-ayxt1lcn/websockets
Storing debug log for failure in /root/.pip/pip.log
如果我尝试安装 websockets (https://pypi.org/project/websockets/) 我会得到这个回报:
[...]Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-d5s2p_/websocketsStoring debug log for failure in /root/.pip/pip.log
pip.log 返回:
Skipping (...) because it is not compatible with this Python
那么我该如何安装呢?
【问题讨论】:
-
那么日志
/root/.pip/pip.log是什么? -
code 1 错误只是表明存在问题,因此很难仅使用它来做任何事情来调试问题。您可能会在指示的调试日志文件中看到有关失败的更多详细信息,以便更好地了解失败的原因和位置。
-
ok thx so... 跳过 (...) 因为它与此 Python 不兼容
-
如果你使用
pip3而不是pip呢? -
@AdamTL pip3 ...Pythonversion 3.8
标签: python pip discord discord.py python-3.8