Xiao Wang

How to install Python Package

Posted on February 08, 2015

“Life is short, you need Python…”


###pip Method

  • First, install pip:one can download the tools from get-pip.py

  • In the terminal, set the working directory that contains the get-pip.py file, and then type the command python get-pip.py. Then the tool will be successfully installed.

  • Note: When you are installing the pip, there is a warning like permission denied, which means you need the administrator’s right to install the tool. Don’t worry, just typing sudo python get-pip.py and providing your password of the computer, then the tool will be install successfully.

Install python packages

pip install Somepackages # Latest Version
pip install Somepackages == 1.0.4 # Some Specific Version  
pip install Some >== 1.0.4 # Minimum Version

For example:
pip install numpy

Update python packages

pip install -U Package Name


Remove python packages

pip uninstall PackageName

References:
<1> How to install and use pip to manage python packages


Published in categories How-to  Tagged with python