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.
时间: 2024-04-26 22:21:58 浏览: 213
根据你提供的信息,安装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库的开发者来获取更多帮助。
相关问题
重新安装后,问题如下: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 的安装命令。希望这可以帮到你。
尝试了.问题如下: 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
```
如果还有其他问题,请告诉我。
阅读全文