3: Installing Packages(Command line Python scripting )

来源:互联网 发布:瑞士 知乎 编辑:程序博客网 时间:2024/06/05 18:55

Packages are an important way to extend the functionality of Python. We've worked with packages like matplotlib and pandas. The best way to install packages is to use the command line, and a program called pip. The newest versions of Python include pip by default, so installing Python will automatically give you access to pip.

In order to install a package with pip, we just usepip installpip install requests will install the requests package, which can be used to interact with websites and APIs.

Instructions

Type pip install requests to install the requests package.

  • Since the library is already installed, you'll receive an appropriate message to reflect that.

/home/dq$ pip install requests                                                  
Requirement already satisfied (use --upgrade to upgrade): requests in /dataquest
/system/env/python3/lib/python3.4/site-packages 

0 0
原创粉丝点击