pip
先来演示pip的错误打开方式:
C:\Users\86188>py
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pip' is not defined
>>>
问题出在哪呢?细心的同学会问了。其实呢,pip虽然是python的自带工具,而且安装了python之后会自动安装上pip,但pip工具并不能在python中打开哦!
下面我们演示如何在命令行中退出python,之后打开pip:
>>> exit()
C:\Users\86188>pip
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages