python之pip
#####################
查看当前环境已经安装了哪些包:pip list
获取指定包的所有可用版本
生成requirements.txt
(test_venv) [work@igoodful tmp]$ pip list Package Version ------------------ -------- asgiref 3.7.2 backports.zoneinfo 0.2.1 beautifulsoup4 4.9.3 bs4 0.0.1 certifi 2023.5.7 chardet 3.0.4 click 7.1.2 colorama 0.4.6 commonmark 0.9.1 Django 4.2.3 idna 2.8 pip 23.1.2 pip-search 0.0.12 pipq 0.0.2 Pygments 2.15.1 requests 2.22.0 rich 10.2.2 setuptools 56.0.0 soupsieve 2.4.1 sqlparse 0.4.4 typer 0.3.2 typing_extensions 4.7.1 urllib3 1.25.11
(test_venv) [work@igoodful tmp]$ pip freeze > requirements.txt (test_venv) [work@igoodful tmp]$ cat requirements.txt asgiref==3.7.2 backports.zoneinfo==0.2.1 beautifulsoup4==4.9.3 bs4==0.0.1 certifi==2023.5.7 chardet==3.0.4 click==7.1.2 colorama==0.4.6 commonmark==0.9.1 Django==4.2.3 idna==2.8 pip-search==0.0.12 pipq==0.0.2 Pygments==2.15.1 requests==2.22.0 rich==10.2.2 soupsieve==2.4.1 sqlparse==0.4.4 typer==0.3.2 typing_extensions==4.7.1 urllib3==1.25.11
查看安装包详情
安装pip_search
使用pip_search
########################
igoodful@qq.com