显示pip安装过后的包:
pip show --files SomePackage
也可以:pip list
2.注意pip 和pip3:
如果使用pip3安装了包,比如:
sudo -H pip3 install openstacksdk
pip3 show --files openstacksdk # 使用pip3来show
pip show --files openstacksdk # 这个是查看不出来的
aircraftdeMacBook-Pro:etc ldl$ pip3 show --files openstacksdk
---
Metadata-Version: 2.0
Name: openstacksdk
Version: 0.9.17
Summary: An SDK for building applications to work with OpenStack
Home-page: http://developer.openstack.org/sdks/python/openstacksdk/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
Installer: pip
License: UNKNOWN
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: stevedore, pbr, deprecation, six, os-client-config, keystoneauth1, jsonpatch
Classifiers:
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.5
Files:
openstack/__init__.py
openstack/__pycache__/__init__.cpython-35.pyc
openstack/__pycache__/connection.cpython-35.pyc
openstack/__pycache__/exceptions.cpython-35.pyc
openstack/__pycache__/format.cpython-35.pyc
3.pip安装包之后包的位置是在python的site-packages/
目录下:
aircraftdeMacBook-Pro:etc ldl$ sudo find / -name openstack
Password:
find: /dev/fd/etc: No such file or directory
find: /dev/fd/etc: No such file or directory
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/openstack
4.pip查看安装了哪些包:
pip freeze
5.pip升级自己
python会自动卸载以前的旧版本,并下载安装新版本。
python -m pip install --upgrade pip