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

Python view all libraries installed and export commands

編輯:Python

Catalog

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

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 !



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