I have Python 3.12.3 [MSC v.1938 64 bit (AMD64)] on win32.
The connection to servers is blocked on my network so i can’t use pip to install packages but I can go to https://pypi.org to download wheel file or .tar.gz file.
The other problem is that I don’t have the wheel module so i can’t use the command python -m wheel install package.whl
.
I downloaded wheel-0.43.0.tar.gz, unzipped then in the folder i do the command: python setup.py install
then i get this error ModuleNotFoundError: No module named ‘distutils’
5
You can still use pip without server access.
Put the downloads in a directory, cd
to that directory, then python -m pip install --no-index -f . <package_name1> [package_name2...]
. --no-index
prevents going to the network to look for the pypi package index, and -f .
(short for --find-links
) looks in the current directory for packages.
If you have a system that does have access to the network, use python -m pip download <package>
and it will also download any dependencies. Then transfer them to the system that doesn’t have network access (or at least now you know all the dependencies😉).
1