At times you will find yourself with a pip install failure stating that a package or a specific version of a package cannot be found. But when browsing Artifactory's repository, you find the package.
Taking the package numexpr for example, you would see a similar error:
This is due to distribution tags in the wheel file generated by python not containing the distribution of your current machine. One way to tell if this is the case is if only a .tar.gz PyPi source code archive can be installed on the build server when there are newer wheel versions.
You can fix that by regenerating the wheel file on the build system.
- Download the python archive from your Artifactory instance locally to your build machine.
- Open the archive with the following command:
- tar -xvf <package-name>.tar.gz
- Navigate to the inflated package folder
- Install the dependencies:
- pip install .
- Create the new archive and reupload the PyPi package:
- python3 setup.py bdist_wheel upload -r local
After having followed these steps you should be able to use this package on your build system without any hiccups.