简体   繁体   English

使用Python的paramiko模块时出错

[英]error using paramiko module of Python

Ia m using Python 2.7.6 and installed paramiko module. 使用Python 2.7.6并安装了paramiko模块。 When I import it on CLI, I get "zipimport.ZipImportError: can't decompress data;zlib not available". 在CLI上导入时,出现“ zipimport.ZipImportError:无法解压缩数据; zlib不可用”。

I installed python-devel module but it looks like it is getting installed for Python 2.6.6 - the older version on the same system. 我安装了python-devel模块,但看起来它正在为Python 2.6.6安装-同一系统上的旧版本。

When I do "sudo yum install python-devel", I get "Package python-devel-2.6.6-51.el6.x86_64 is already installed and lates version. Nothing to do". 当我执行“ sudo yum install python-devel”时,我得到“ Package python-devel-2.6.6-51.el6.x86_64已安装,并且是最新版本。什么也没做”。

Can someone help please? 有人可以帮忙吗? How do I install python-devel for 2.7.6 and import paramiko module without issues? 如何为2.7.6安装python-devel并导入paramiko模块而不会出现问题?

Thanks! 谢谢!

I re-installed python using https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only and it worked fine. 我使用https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only重新安装了python而且效果很好。 I think the existing version of Python 2.6.6 and my new version Python 2.7.6 got mixed up -- so creating symbolic links to Python 2.7.6 and installation of "Development tools" and other packages helped. 我认为现有版本的Python 2.6.6和新版本的Python 2.7.6混杂在一起-因此创建指向Python 2.7.6的符号链接以及安装“开发工具”和其他软件包很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM