0

我正在尝试下载 TensorFlow 及其所有依赖项,以便我可以将其 PIP 安装到另一台没有互联网的计算机上。

我已经通过 PIP3 将 Tensorflow 安装到运行 RH UBI8 的 Docker 容器上。

到目前为止,我执行了: pip3 freeze > req.txt

然后我执行

pip3 -download req.txt -d 目录

我收到此错误:

ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-download-q4ak01zj/gpg/setup.py'"'"'; __file__='"'"'/tmp/pip-download-q4ak01zj/gpg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gc7ddbqr
         cwd: /tmp/pip-download-q4ak01zj/gpg/
    Complete output (1 lines):
    Could not find gpgme-config.  Please install the libgpgme development package.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

在 req.txt 我有 gpg==1.10.0

我不明白为什么我会收到这个错误。我的包在我的机器上运行。而且我什至没有尝试安装它,我只是想下载它。为什么还要尝试运行安装程序?

4

1 回答 1

2

pip download递归下载依赖项。也就是说,它下载列出的包,提取每个下载的包并列出依赖项。它继续下载依赖项的依赖项等等。

Python 模块gpg以纯源形式分发,因此pip提取它并运行setup.py以获取依赖项列表。Saidsetup.py包含以下代码:

try:
    subprocess.check_call(gpgme_config + ['--version'],
                          stdout=devnull)
except:
    sys.exit("Could not find gpgme-config.  " +
             "Please install the libgpgme development package.")

总是setup.py. _ 所以运行代码,代码在您的计算机上pip download找不到。gpgme-config因此错误。

这可能是包中的错误,建议您向作者报告:gnupg-devel@gnupg.org

于 2020-09-14T18:19:23.470 回答