Getting a PIP error when trying to download all my current packages for offline use

2.4k views Asked by At

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?

1

There are 1 answers

3
phd On

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: [email protected]