pip管理包(模块的安装、查看与卸载)
样例:
1、模块的安装(pip install 模块名)
图像处理模块Pillow
代码:
pip install Pillow -i http://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
参考链接:
将pip源更换到国内镜像
2、模块的查看(pip list)
代码:
pip list
参考链接:
python模块的安装与卸载
3、模块的卸载 (pip uninstall 模块名)
代码:
pip uninstall Pillow
Microsoft Windows [版本 10.0.18363.1139]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\Users\Ashley>pip install Pillow -i http://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Looking in indexes: http://pypi.tuna.tsinghua.edu.cn/simple
Collecting Pillow
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/23/26/46bfa1d717016f7c0eecacd8e62476c5955a2b320578ec5838323d89ba38/Pillow-7.2.0-cp35-cp35m-win_amd64.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 29 kB/s
Installing collected packages: Pillow
Successfully installed Pillow-7.2.0
C:\Users\Ashley>pip list
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Package Version
---------------------------- ---------
aioredis 1.0.0
amqp 2.2.2
appdirs 1.4.3
arrow 0.10.0
asgi-redis 1.4.0
asgiref 1.1.2
astroid 1.5.2
async-timeout 2.0.1
attrs 17.4.0
autobahn 18.4.1
Automat 0.6.0
automaton 1.9.0
autopep8 1.3.2
Babel 2.3.4
beautifulsoup4 4.6.0
billiard 3.5.0.3
cachetools 2.0.0
celery 4.1.0
Cerberus 1.1
certifi 2017.4.17
channels 1.1.8
channels-redis 2.1.1
chardet 3.0.4
click 6.7
colorama 0.3.9
constantly 15.1.0
contextlib2 0.5.5
coreapi 2.3.3
coreschema 0.0.4
daphne 1.4.2
debtcollector 1.14.0
decorator 4.0.11
Django 2.0.4
django-bootstrap-breadcrumbs 0.9.1
django-crispy-forms 1.7.2
django-debug-toolbar 1.9.1
django-extensions 1.9.1
django-filebrowser 3.10.1
django-filter 1.1.0
django-grappelli 2.11.1
django-lint 2.0.4
djangorestframework 3.8.2
docutils 0.14
et-xmlfile 1.0.1
fasteners 0.14.1
fcID-contorl-eth 1.0.4
future 0.16.0
futures 3.1.1
futurist 1.1.0
get 0.0.0
gevent 1.2.2
goslate 1.5.1
greenlet 0.4.12
hiredis 0.2.0
hyperlink 18.0.0
idna 2.5
incremental 17.5.0
install 1.3.3
iso8601 0.1.11
isort 4.2.5
itchat 1.3.10
itypes 1.1.0
jdcal 1.3
jieba 0.38
Jinja2 2.9.6
json2html 1.1.1
jsonfield 2.0.2
jsonpath-rw 1.4.0
jsonpath-rw-ext 1.1.3
jsonschema 2.6.0
kombu 4.1.0
lazy-object-proxy 1.3.1
logilab-astng 0.24.3
logilab-common 1.4.1
lxml 3.8.0
Markdown 2.6.11
MarkupSafe 1.0
mccabe 0.6.1
monotonic 1.3
msgpack 0.5.6
msgpack-python 0.4.8
mysql-connector-python 8.0.4
netaddr 0.7.19
netifaces 0.10.6
networkx 1.11
numpy 1.14.2
olefile 0.44
openpyxl 2.4.8
oslo.i18n 3.15.3
oslo.serialization 2.18.0
oslo.utils 3.25.1
packaging 16.8
pbr 3.0.1
Pillow 7.2.0
pip 20.2.3
ply 3.11
post 0.0.0
prettytable 0.7.2
pycodestyle 2.3.1
PyDictionary 1.5.2
pyflakes 1.6.0
pyfpgrowth 1.0
pylint 1.7.1
pymining 0.2
PyMySQL 0.7.11
pyparsing 2.2.0
pypiwin32 219
pypng 0.0.18
PyQRCode 1.2.1
PyQt5 5.9.2
pyqt5-tools 5.9.0.1.2
python-dateutil 2.6.0
pytz 2018.4
pywin32 221
pyzmq 16.0.2
query-string 0.0.0
redis 2.10.5
reportlab 3.5.48
request 0.0.0
requests 2.18.1
selenium 3.4.3
setuptools 39.0.1
simplejson 3.11.1
sip 4.19.6
six 1.11.0
sqlparse 0.2.4
stevedore 1.22.0
taskflow 2.11.0
tenacity 4.1.0
Twisted 17.9.0
txaio 2.10.0
untangle 1.1.1
uritemplate 3.0.0
urllib3 1.21.1
vine 1.1.4
webencodings 0.5.1
WebTool 1.0
wiringpi2 2.32.3
WMI 1.4.9
wrapt 1.10.11
xlwt 1.3.0
xmltodict 0.11.0
zerorpc 0.6.1
zope.interface 4.4.3
C:\Users\Ashley>pip unistall Pillow
ERROR: unknown command "unistall" - maybe you meant "uninstall"
C:\Users\Ashley>pip uninstall Pillow
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Found existing installation: Pillow 7.2.0
Uninstalling Pillow-7.2.0:
Would remove:
d:\lenovosoftstore\python35\lib\site-packages\pil\*
d:\lenovosoftstore\python35\lib\site-packages\pillow-7.2.0.dist-info\*
Proceed (y/n)? y
Successfully uninstalled Pillow-7.2.0
C:\Users\Ashley>