1

I'm trying to download TensorFlow and all its dependencies, so that I can PIP install it onto another computer without internet.

I've installed Tensorflow onto my Docker Container running RH UBI8 via PIP3.

So far I executed : pip3 freeze > req.txt

Then I executed

pip3 -download req.txt -d directory

I get this error:

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.

in req.txt I have gpg==1.10.0

I don't understand why I'm getting this error. My Package runs on my machine. And I'm not even trying to install it, I'm just trying to download it. Why is even attempting to run setup?

phd
  • 82,685
  • 13
  • 120
  • 165
Raven
  • 529
  • 7
  • 27

1 Answers1

2

pip download downloads dependencies recursively. That is, it downloads listed packages, extract every downloaded packages and lists dependencies. It continues to download dependencies of dependencies and so on and so forth.

Python module gpg is distributed in source-only form so pip extracts it and runs setup.py to get the list of dependencies. Said setup.py contains the following code:

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

which is always executed with setup.py. So pip download runs the code and the code failed to find out gpgme-config on your computer. Hence the error.

This is perhaps and error in the package which you're recommended to report to the authors: gnupg-devel@gnupg.org

phd
  • 82,685
  • 13
  • 120
  • 165
  • Thank you. Do you know of a work-around to accomplish my goal? – Raven Sep 14 '20 at 19:11
  • 1. Install `libgpgme` at the host where you download packages. 2. Or download [the source code for Python package `gpg`](https://pypi.org/project/gpg/#files), fix its `setup.py` and continue downloading with the new package. – phd Sep 14 '20 at 19:37