Preface
One 、 View installed Libraries
1. Command query
2. From the installation path site-packages see
Two 、 Export library installation files
1. export
2. install
summary
Preface One 、 View installed Libraries 1. Command querypip list
2. From the installation path site-packages see Two 、 Export library installation files 1. export Execute the command in the Library folder we want to export :
pip ferrze >requirements.txt
If it appears :
WARNING: Ignoring invalid distribution -ip (e:\py\python3.7\python37\lib\site-packages)
translate : Warning : Ignore invalid distribution
Cause analysis : install package Half way interruption .
Solution : In the corresponding directory ( My directory is :E:\py\python3.7\Python37\Lib\site-packages) find ip Folder , As shown in the figure , Delete the following two folders .
Update before installing pip, In case some applications cannot be installed ;
python3 -m pip install --upgrade pip
Install libraries on the new environment :
# Normal download and installation pip install -r requirements.txt # Download and install Tsinghua source pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # Download and install watercress pip install -r requirements.txt -i https://pypi.douban.com/simple
summary This is about python This is the end of the article about viewing all the libraries you have installed and exporting them , More about python To view all the library contents, please search the previous articles of SDN or continue to browse the following related articles. I hope you can support SDN in the future !