ImportError:没有名为zlib的模块

时间:2017-06-23 16:50:37

标签: python boto

我在运行python脚本以在S3上发送文件时收到此错误

File "docs/setup/s3transfer.py", line 121, in <module>
    main(*args, **kwargs)
  File "docs/setup/s3transfer.py", line 28, in main
    conn = boto.connect_s3(access_key, sceret_key)
  File "/usr/local/lib/python2.6/site-packages/boto/__init__.py", line 140, in connect_s3
    from boto.s3.connection import S3Connection
  File "/usr/local/lib/python2.6/site-packages/boto/s3/connection.py", line 30, in <module>
    from boto.auth import detect_potential_s3sigv4
  File "/usr/local/lib/python2.6/site-packages/boto/auth.py", line 34, in <module>
    import boto.utils
  File "/usr/local/lib/python2.6/site-packages/boto/utils.py", line 57, in <module>
    import gzip
  File "/usr/local/lib/python2.6/gzip.py", line 9, in <module>
    import zlib
ImportError: No module named zlib

虽然我做的时候

sudo yum install zlib-devel

我明白了:

Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * epel: kartolo.sby.datautama.net.id
 * extras: centos.myfahim.com
 * updates: centos.myfahim.com
Package zlib-devel-1.2.7-17.el7.x86_64 already installed and latest version
Nothing to do

有人可以帮忙吗?

0 个答案:

没有答案