Pip install --find-links html file format

I need to include several python packages in my product, but the jenkins server that is doing the build has no internet access. I downloaded one of the packages using pip download by downloading the package and all its dependencies. However, I need to make sure pip knows where to find these dependencies. I am trying to use the --no-index and -find-links options with the path to the html file with links to these packages. The complete command looks like this:

pip install http://SERVER/python-packages/impyla/0.14.0/impyla-0.14.0.tar.gz --no-index --trusted-host SERVER --find-links http://SERVER/python-packages/impyla/0.14.0/packages.html

      

... and the packages.html file looks like this:

<a href="http://SERVER/python-packages/impyla/0.14.0/bitarray-0.8.1.tar.gz">bitarray-0.8.1.tar.gz</a>
<a href="http://SERVER/python-packages/impyla/0.14.0/ply-3.10.tar.gz">ply-3.10.tar.gz</a>
<a href="http://SERVER/python-packages/impyla/0.14.0/six-1.10.0-py2.py3-none-any.whl">six-1.10.0-py2.py3-none-any.whl</a>
<a href="http://SERVER/python-packages/impyla/0.14.0/thriftpy-0.3.9.tar.gz">thriftpy-0.3.9.tar.gz</a>
      

Run codeHide result


However, when jenkins tries to run these commands, I get:

Could not find a version satisfying thriftpy requirement> = 0.3.5 (from impyla == 0.14.0) (from versions :)

No suitable distribution found for thriftpy> = 0.3.5 (from impyla == 0.14.0)

I am wondering if my packages.html file is not in the correct format, but I cannot find examples of using the html file to resolve dependencies. Has anyone used -find-links successfully?

+3


source to share


2 answers


I have never seen a requirements file in html format, but maybe it is possible, the examples in the official doc are .txt files, but I think your problem is one more thing, for example, you should check the following operating system architecture, download package because this package is tied to this architecture, I mean 64 bit or 32 bit, one more thing is to check that you have the same python interpreter or another compatible with where you downloaded the packages, everything, what is important, even if it is not important for you to keep the version thriftpy

, do not specify the version for this package and do not remove it from the requirements file, and let the peak find the version of the mayor that works for you, this is what happens if you do not specify it version for the package.



0


source


Thanks to emulbreh, I added -v to the package install command and reported:

Skipping page http: //SERVER/python-packages/impyla/0.14.0/packages.html due to Content-Type: text / plain; encoding = UTF-8



Once I was sure the html file was served with the correct content type, I got it to work.

0


source







All Articles