无法离线安装 s3cmd

Not able to install s3cmd offline

我们正在尝试在离线模式下安装 s3cmd,但出现以下错误。

Searching for python-magic
Reading https://pypi.python.org/simple/python-magic/
Download error: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'python-magic' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or download links found for python-magic.
error:Could not find suitable distribution for Requirement.parse('python-magic')
===

顺便说一句,python-magic-4.24-43.27.1 已经安装在我们的服务器中,但为什么 s3cmd 没有检测到它?

有什么方法可以跳过这些步骤并安装 s3cmd 吗?

我 运行 在 Debian/jessie 上遇到同样的错误。我这样编辑 setup.py 文件:

#install_requires = ["python-dateutil", "python-magic"]
install_requires = ["python-dateutil"]

然后强制安装:

python setup.py install --force

这将跳过 python-magic 包并允许安装完成。

这些命令对我有用

sudo apt-get install python-pip

sudo pip install s3cmd