paramiko 2.4.2 还是安装了不。问题提示:Requirement already satisfied (use --upgrade to upgrade): bcrypt>=3.1.3 in /usr/lib64/python2.7/site-packages (from paramiko==2.4.2) Collecting cryptography>=1.5 (from paramiko==2.4.2) Using cached https://files.pythonhosted.org/packages/19/8c/47f061de65d1571210dc46436c14a0a4c260fd0f3eaf61ce9b9d445ce12f/cryptography-41.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-Tnnqu9/cryptography/setup.py", line 87 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-Tnnqu9/cryptography/ 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-03-15 10:47:26 浏览: 93
根据错误提示,安装 Paramiko 2.4.2 时出现了 `cryptography` 模块的错误。这是因为 `cryptography` 版本过低,需要升级到 2.2.2 及以上版本。
你可以先尝试升级 `pip` 版本:
```shell
pip install --upgrade pip
```
然后再安装 `cryptography` 模块:
```shell
pip install cryptography==3.4.8
```
最后再安装 Paramiko 2.4.2:
```shell
pip install paramiko==2.4.2
```
如果还是有问题,可以尝试升级 Python 版本或者使用其他 SSH 库来替代 Paramiko。
相关问题
重新安装后,问题如下:Collecting paramiko==2.7.2 Using cached https://files.pythonhosted.org/packages/95/19/124e9287b43e6ff3ebb9cdea3e5e8e88475a873c05ccdf8b7e20d2c4201e/paramiko-2.7.2-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): bcrypt>=3.1.3 in /usr/lib64/python2.7/site-packages (from paramiko==2.7.2) Collecting pynacl>=1.0.1 (from paramiko==2.7.2) Downloading https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz (3.4MB) 100% |████████████████████████████████| 3.4MB 19kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-RqQX6B/pynacl/setup.py", line 29, in <module> from setuptools.command.build_clib import build_clib as _build_clib ImportError: No module named build_clib ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-RqQX6B/pynacl/ 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 依赖 PyNaCl 时出现了错误。错误信息显示缺少 `build_clib` 模块,可能是因为缺少 setuptools 包导致的。你可以尝试升级 pip 版本,然后再次运行安装命令:
```
pip install --upgrade pip
pip install paramiko
```
如果升级 pip 后仍然出现错误,可以尝试手动安装 setuptools:
```
pip install setuptools
```
然后再次运行 paramiko 的安装命令。希望这可以帮到你。
Collecting 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-ocx4h0/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-ocx4h0/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.
根据你提供的信息,安装Paramiko时出现了错误。错误信息中显示了以下内容:
```
SyntaxError: invalid syntax
```
这个错误提示是因为安装的bcrypt库版本不兼容当前的Python版本,或者是pip版本过低导致的。建议你更新pip到最新版本,使用以下命令:
```
pip install --upgrade pip
```
然后再重新安装Paramiko库:
```
pip install paramiko==2.7.2
```
如果问题仍然存在,请尝试先安装bcrypt库,再安装Paramiko库:
```
pip install bcrypt
pip install paramiko==2.7.2
```
这些方法中,更新pip或安装bcrypt库可能对你的问题有帮助,如果问题仍然存在,可以尝试升级Python版本或者联系Paramiko库的开发者来获取更多帮助。
阅读全文