Is it possible to install a Python wheel without using pip
? I always have issues with installing pip
, so I usually install libraries manually by copying and pasting. I'm wondering if there is a way to do wheel files in a similar manner.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
It is. Actually .whl files are just zip archives, so you can just extract their content and play with libraries path variable to make it work. Yet it is really bad practice.
I'm assuming you have internet access, but you don't have a working pip installation.
Download the pip wheel:
To find the url of a release in the first place, you can get the index json endpoint. For example:
"Execute" it with your other wheel file. For example, if you were trying to install setuptools v39.0.1 from bdist, the command would look like this:
You will now have a working setuptools installation, but no pip.
In case you were wondering, yes you can use the same trick to install pip itself. That command would look like this:
And now you should have a working pip installation, associated with whichever interpreter this
python
executable is pointing at.