A hacky script to install Python packages from local wheels / tarballs. pip should do this by retrieving remote files, but if you're behind a firewall, you can use this instead.
- Find and download packages - ideally platform-specific wheel (.whl) files from: https://pypi.python.org/pypi
- set the path and name of your desired venv on line 6.
- package_names_in_order.txt lists files in a specific order, to enable installing requirements in the correct dependency order.
- /packages/ subdirectory (located relative to the .bat script dir) can contain anything pip accepts: .whl; .tar.gz; ...
- If you don't require a specific installation order, you can just use (note this is only for .whl files):
for %%f in ( %~dp0\packages\*.whl ) do ( echo "installing %%~f" pip install %%~f )
in place of the package_names_in_order.txt line.
Hello Powell,
actually I was working on my college project that is about automating a website and downloading things by taking name as input.
Now to run that program on any other system first I have to install python and some other python modules, but then it makes it useless.
So I was thinking if I could get a bat file that could install python in the system, I tried but couldn't find anything useful on the internet and
I don't know bat scripting so if you could hep.
I know I'm asking too much for a help but then got no other options.
hope you would help.