I wrote a package with a dependency's dependency to psutil (my-package
depends on third-party-package
which depends on psutil
).
Since it's supposed to run on a server without any connectivity and without gcc
, I prepared the deployment locally with a psutil
python platform wheel and pip install my-package --download
, then sent everything on the server.
Now everything is ready on the server, but for some reason, when I run the installation, pip
refuses to install psutil
. Note that the server is a red hat 7.2 running pip 7.1.0, virtualenv 1.10.1 and python 2.7.5 (and I can't change the version of anything).
$ pip install /tmp/python_packages/my-package-1.4.zip --no-index
--find-links /tmp/python_packages/ --use-wheel
Ignoring indexes: https://pypi.python.org/simple/
# blablabla, everything goes fine, then
Downloading/unpacking psutil (from third-party-package>=0.9->my-package==1.4)
Could not find any downloads that satisfy the requirement psutil
(from third-party-package>=0.9->my-package==1.4)
Cleaning up...
No distributions at all found for psutil (from third-party-package>=0.9->my-package==1.4)
Storing complete log in /home/anto/.pip/pip.log
Here is what pip.log
says:
Downloading/unpacking psutil (from third-party-package>=0.9->my-package==1.4)
URLs to search for versions for psutil (from third-party-package>=0.9->my-package==1.4):
# bla
Skipping file:///tmp/python_packages/psutil-4.2.0-cp27-cp27mu-linux_x86_64.whl
because it is not compatible with this Python
# bla
Could not find any downloads that satisfy the requirement psutil (from third-
party-package>=0.9->my-package==1.4)
Cleaning up...
So "not compatible with this Python", ok. But here is the really weird part: if I install psutil
without anything else, and then the rest, everything goes fine.
$ pip install /tmp/python_packages/psutil-4.2.0-cp27-cp27mu-linux_x86_64.whl
Unpacking /tmp/python_packages/psutil-4.2.0-cp27-cp27mu-linux_x86_64.whl
Installing collected packages: psutil
Successfully installed psutil
Cleaning up...
$ pip freeze -l
psutil==4.2.0
$ pip install /tmp/python_packages/my-package-1.4.zip --no-index
--find-links /tmp/python_packages/ --use-wheel
# blablabla
Successfully installed my-package third-party-package
Cleaning up...
What am I missing ? Any clue ?
install_requires = ['psutil']
; nothing fancy. – Straightpsutil
's wheel is 64bits because the VM is 64bits (but perhaps it could be related to the root cause indeed ?) – Straight