依赖库安装后,但是仍然出现问题: Using cached https://files.pythonhosted.org/packages/87/62/cee9551811c846e9735f749dbdf05d4f9f0dbcecd66eae35b5daacf9a117/paramiko-3.2.0.tar.gz Complete output from command python setup.py egg_info: /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls' warnings.warn(msg) /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in paramiko setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-glnPul/paramiko/ You are using pip version 8.1.2, however version 23.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
时间: 2024-04-25 20:27:56 浏览: 207
这个错误可能是因为 paramiko 版本过新,而你的 Python 版本过旧所导致的。paramiko 3.0.0 及以后的版本需要 Python 2.7.13 或更高版本才能正常安装。
你可以先尝试升级 Python 版本,如果无法升级,可以使用旧版本的 paramiko。可以使用以下命令来安装 paramiko 2.7.2 版本:
```
pip install paramiko==2.7.2
```
如果还有其他问题,请告诉我。
相关问题
尝试了.问题如下: Using cached https://files.pythonhosted.org/packages/95/19/124e9287b43e6ff3ebb9cdea3e5e8e88475a873c05ccdf8b7e20d2c4201e/paramiko-2.7.2-py2.py3-none-any.whl Collecting bcrypt>=3.1.3 (from paramiko==2.7.2) Using cached https://files.pythonhosted.org/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad/bcrypt-4.0.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-_VgLcj/bcrypt/setup.py", line 73 print(f" Python: {'.'.join(str(v) for v in sys.version_info[:3])}") ^ SyntaxError: invalid syntax ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_VgLcj/bcrypt/ You are using pip version 8.1.2, however version 23.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
这个错误提示是因为在安装 bcrypt 时,出现了语法错误。这个问题通常是由于使用了不兼容 Python 版本的语法导致的。
你可以尝试升级 Python 版本或者使用较旧的 bcrypt 版本来解决问题。你可以尝试安装 bcrypt 3.1.7 版本:
```
pip install bcrypt==3.1.7
```
然后再重新安装 paramiko:
```
pip install paramiko==2.7.2
```
如果还有其他问题,请告诉我。
Collecting paramiko Using cached https://files.pythonhosted.org/packages/87/62/cee9551811c846e9735f749dbdf05d4f9f0dbcecd66eae35b5daacf9a117/paramiko-3.2.0.tar.gz Complete output from command python setup.py egg_info: /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls' warnings.warn(msg) /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in paramiko setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rlEOQB/paramiko/ You are using pip version 8.1.2, however version 23.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
这个错误似乎是因为你的 Paramiko 版本与 Python 2 不兼容,你可以尝试升级到 Python 3 或使用旧版本的 Paramiko。
如果你想要继续使用 Python 2,可以尝试安装 Paramiko 的旧版本,例如:
```
pip install paramiko==2.7.2
```
这将安装 Paramiko 2.7.2 版本,它应该能够与 Python 2 兼容。如果你仍然遇到问题,建议升级到 Python 3 来避免此类兼容性问题。
阅读全文