Record 2021.12.11 to get the environment encountered a bunch of problems elder brother told me you can use requirements to install the environment, do not have to install one by one!
I looked this up online and found that it's found in python projects and is mainly used toRecord the dependencies and the exact version number of the environment.。
If there's an environment loaded, you can use it inside the environment
pip freeze >
Automatically generate this file, which will include the dependency packages and version numbers of your installed environment
As shown below:
Later, if you create a new virtual environment, you can use the
pip install -r
Go install the dependencies (no need to pip install one by one) so that the environment is the same
It feels like this would solve the environmental issues at delivery when working on a project hahahaha
I've seen this txt file used before!
Learned!
Updated 2022.1.30
When I packaged the project today, I found that using the above, all the dependencies were there, and pip also reported an error in the new environment.
Reference Article:https:///article/
Use this method below:
second type
pip install pipreqs
Generated in the current directory:
pipreqs . --encoding=utf8 --force
Generate a new one as follows.
summarize
to this article on the use of python project is introduced to this article, more related python method content please search for my previous articles or continue to browse the following related articles I hope you will support me in the future more!