How to install a package using pip and save the name to a file to install it later

I would like to do something like pip install requests --save packages.txt

so that I have a list of all that I used and later I could just pip -r install packages.txt

when I cloned it from the repository.

+3


source to share


2 answers


you can use freeze

to remove all settings in your .txt file:

 pip freeze > requirements.txt

      



And, if needed, you can run the following command:

 pip install -r requirements.txt

      

+3


source


pip install package --download = "directory path"

pip install --no-index --find-links = "directory path" package_name



Note : pip download

Replaces the --download option with pip install

which is now deprecated and will be removed in pip 10.

0


source







All Articles