pip 之于 python 犹如 npm 之于 node.js,亦犹如 package control 之于 Sublime Text
不知什么原因 python3.5.2 安装完之后竟然没有 pip, 可是在安装向导里面确实有 pip 这个复选框(确认已勾选)。
Warning
Be cautious if you're using a Python install that's managed by your operating system or another package manager. get-pip.py
does not coordinate with those tools, and may leave your system in an inconsistent state.
现在我们可以在命令行中使用 pip 了。
通过 pip 安装工具包,使用命令:
pip install xx
pip 卸载工具包的命令是 uninstall:
pip uninstall xx
使用 pip show xx
显示工具包的相关信息,如下查看 pygments 的相关信息。
另外 使用 pip list 来列出已安装包
C:\Users\DELL\Desktop
λ pip show pygments
---
Metadata-Version: 2.0
Name: Pygments
Version: 2.1.3
Summary: Pygments is a syntax highlighting package written in Python.
Home-page: http://pygments.org/
Author: Georg Brandl
Author-email: georg@python.org
Installer: pip
License: BSD License
Location: c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages
Requires:
Classifiers:
License :: OSI Approved :: BSD License
Intended Audience :: Developers
Intended Audience :: End Users/Desktop
Intended Audience :: System Administrators
Development Status :: 6 - Mature
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Operating System :: OS Independent
Topic :: Text Processing :: Filters
Topic :: Utilities
Entry-points:
[console_scripts]
pygmentize = pygments.cmdline:main
如果要对已经安装的工具包进行更新,使用 命令 pip install -U xx
我们的 pip 已经是最新的了,无需更新。