程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python view all libraries installed by itself and export them

編輯:Python

List of articles

List of articles

  • List of articles
  • 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 query

pip 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 .

2. install

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

Share :
Great self transcendence , It is to stand in the times and combine with people 、 We should judge the situation from the height of calling , In order to realize the value of life in the most ideal way , At the expense of personal preference and original intention , Create a new starting line for life , Explore new fields , Realize the rational sublation of the research premise and the main goal .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved