This blog is about the useful command of importing environment.
You are welcomed to chat about it and if you like this blog, do not forget to give me a like.
Welcome to see my homepage and contact me: NicholasYe’s Homepage.
pip freeze > requirements.txt or pip list --format=freeze > requirements.txt to generate requirement listpip install -r requirements.txt or conda install --yes --file requirements.txt to install the listrequirements.txt has some invalid packages
while read requirement; do conda install --yes $requirement; done < requirements.txtconda but can use pip
while read requirement; do conda install --yes $requirement || pip install $requirement; done < requirements.txtconda env export > freeze.ymlconda env create -f freeze.ymlPlease clearly mark the source of the article in the process of reproducing it! Respect for originality and intellectual property rights, thanks!