我试图升级Paramiko为我的覆盆子pi,但由于某种原因我不能让它升级到最新版本。就像CFFI的前身升级一样。
当前版本的Paramiko已经过时了:paramiko == 1.15.1
root@raspberrypi:~/Adafruit-Motor-HAT-Python-Library/examples# pip freeze
Adafruit-GPIO==1.0.3
Adafruit-MotorHAT==1.4.0
Adafruit-PureIO==0.2.1
Pillow==2.6.1
RPi.GPIO==0.6.3
RTIMULib==7.2.1
argparse==1.2.1
cffi==0.8.6
chardet==2.3.0
colorama==0.3.2
ecdsa==0.11
gpiozero==1.4.0
html5lib==0.999
lxkeymap==0.1
mcpi==0.1.1
ndg-httpsclient==0.3.2
numpy==1.8.2
paramiko==1.15.1
picamera==1.13
pifacecommon==4.2.1
pifacedigitalio==3.1.0
ply==3.4
pyOpenSSL==0.13.1
pyasn1==0.1.7
pycparser==2.10
pycrypto==2.6.1
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6
requests==2.4.3
sense-hat==2.2.0
six==1.8.0
smbus==1.1
spidev==3.0
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2
当我尝试升级时,我得到以下内容:
pip install paramiko --upgrade
Downloading/unpacking paramiko from https://pypi.python.org/packages/be/9f/2b899b028aec1f3973253c0cf8dda6fbff65f4930f7ebedc43033e9f1b18/paramiko-2.4.0-py2.py3-none-any.whl#md5=53bf4a66ff143bda10b4b4868effac0d
Downloading paramiko-2.4.0-py2.py3-none-any.whl (192kB): 192kB downloaded
Downloading/unpacking pyasn1>=0.1.7 from https://pypi.python.org/packages/ba/fe/02e3e2ee243966b143657fb8bd6bc97595841163b6d8c26820944acaec4d/pyasn1-0.4.2-py2.py3-none-any.whl#md5=766a80e17caafe179f0b6d56569c63d4 (from paramiko)
Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB): 71kB downloaded
Downloading/unpacking bcrypt>=3.1.3 (from paramiko)
Downloading bcrypt-3.1.4.tar.gz (42kB): 42kB downloaded
Running setup.py (path:/tmp/pip-build-NEwtcG/bcrypt/setup.py) egg_info for package bcrypt
warning: no previously-included files found matching 'requirements.txt'
warning: no previously-included files found matching 'tasks.py'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'wheel-scripts'
warning: no previously-included files found matching 'Jenkinsfile'
warning: no previously-included files found matching '.jenkins'
warning: no previously-included files matching '*' found under directory '.jenkins'
warning: no previously-included files matching '*' found under directory 'wheel-scripts'
no previously-included directories found matching '.travis'
Downloading/unpacking pynacl>=1.0.1 (from paramiko)
Downloading PyNaCl-1.2.1.tar.gz (3.3MB): 3.3MB downloaded
Running setup.py (path:/tmp/pip-build-NEwtcG/pynacl/setup.py) egg_info for package pynacl
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-NEwtcG/pynacl/setup.py", line 251, in <module>
"Programming Language :: Python :: 3.6",
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
ImportError: No module named setuptools_ext
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-NEwtcG/pynacl/setup.py", line 251, in <module>
"Programming Language :: Python :: 3.6",
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
ImportError: No module named setuptools_ext
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-NEwtcG/pynacl
Storing debug log for failure in /root/.pip/pip.log
欢迎提出建议。谢谢。
答案 0 :(得分:0)
尝试安装setuptools以解决依赖性问题。
pip install setuptools
然后你可以升级paramiko版本使用
pip install paramiko --upgrade
答案 1 :(得分:0)
我找到了Paramiko缺陷的解决方法,我在版本1.15.1上打了一个并且不需要进行任何升级。我的怀疑是我的PI有一个损坏的文件导致升级失败。