PIP的使用:使用PIP安装numpy

    xiaoxiao2021-03-25  286

    PIP是一个python的包管理工具。提供了python包的查找,下载,安装,和卸载的功能。

    在安装了pip之后,要将pip添加到环境变量:C:\Python27\Scripts

    以numpy为例演示pip的使用: 首先,下载whl文件。在地址 https://pypi.python.org/pypi/numpy 下载pip,这里下载的是numpy-1.12.1rc1-cp27-none-win_amd64.whl

    (安装) CD到相应的目录后,执行命令 到相应的目录后,执行命令 pip install numpy-1.12.1rc1-cp27-none-win_amd64.whl

    D:\>pip install numpy-1.12.1rc1-cp27-none-win_amd64.whl Processing d:\numpy-1.12.1rc1-cp27-none-win_amd64.whl Installing collected packages: numpy Successfully installed numpy-1.12.1rc1

    提示Successfully installed表示安装成功。

    (显示包信息) 在安装成功之后,可明明用命令pip show numpy显示包信息。

    D:\>pip show numpy Name: numpy Version: 1.12.1rc1 Summary: NumPy: array processing for numbers, strings, records, and objects. Home-page: http://www.numpy.org Author: NumPy Developers Author-email: numpy-discussion@scipy.org License: BSD Location: c:\python27\lib\site-packages Requires:

    (查找所有安装的包) 使用pip list命令显示所有安装的包。

    D:\>pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. numpy (1.12.1rc1) pip (9.0.1) setuptools (28.8.0)

    (卸载包) pip uninstall numpy

    转载请注明原文地址: https://ju.6miu.com/read-7445.html

    最新回复(0)