I know how to install *.whl
files through cmd (the code is simply python -m pip install *so-and-so-.whl
). But since I accidentally deleted my OS and had no backups I found myself in the predicament to reinstall all of my whl files for my work.
This comes up to around 50 files. I can do this manually which is pretty simple, but I was wondering how to do this in a single line. I can't seem to find anything that would allow me to simply type in python -m pip install *so-and-so.whl
to find all of the whl files in the directory and install them.
Any ideas?
To pip install more than one Python package, the packages can be listed in line with the same pip install command as long as they are separated with spaces. Here we are installing both scikit-learn and the statsmodel package in one line of code. You can also upgrade multiple packages in one line of code.
In Windows cmd
you can use a for loop to do this:
for %x in (dir *.whl) do python -m pip install %x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With