PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Generate requirements.txt file for python3

Go down

Generate requirements.txt file for python3 Empty Generate requirements.txt file for python3

Post by jamied_uk 4th May 2023, 14:27



Go into the folder your py3 projects are in and run the following

Code:
pip3 install pipreqs
pip freeze > requirements.txt


Then on other system you can install using the file like this

Code:
pip3 install -r requirements.txt


Last edited by jamied_uk on 4th May 2023, 15:04; edited 1 time in total
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Generate requirements.txt file for python3 Empty Re: Generate requirements.txt file for python3

Post by jamied_uk 4th May 2023, 14:34

Get a file for used mods instead of all installed


Code:
pipreqs . --force --encoding utf8


Ignore Backup folders like this

Code:
pipreqs . --force --encoding utf8 --ignore Backup
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Generate requirements.txt file for python3 Empty Re: Generate requirements.txt file for python3

Post by jamied_uk 7th May 2023, 13:10

Also you can do this if needed!

Code:
pip install -r requirements.txt
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Generate requirements.txt file for python3 Empty Re: Generate requirements.txt file for python3

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum