This is the best feature of any Python release. Good news! Python 3.4 (released March 2014) ships with Pip. If setuptools is not already installed, get-pip.py will install setuptools for you. Then run the following (which may require administrator access): python get-pip.py
To install pip, securely download get-pip.py
If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions. Install using the manual way detailed below. If your Unix/Linux distro doesn't have it in package repos # First command requires you to have enabled EPEL for CentOS7 Installing pip on CentOS 7 for Python 3.xĪssuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip. On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it. Installing pip on CentOS 7 for Python 2.x
On a fresh Debian/Ubuntu install, the package may not be found until you do: sudo apt-get update Run the following command from a terminal: sudo apt-get install python3-pip Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x Run the following command from a terminal: sudo apt-get install python-pip Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x Instructions for some of the more common distros follow. You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason. If you're running Python 2.7.9+ or Python 3.4+Ĭongrats, you should already have pip installed. e djangorestframework=3.4.7 pymongo=3.3.0 wsgiref=0.1.Edit: Manual installation and use of setuptools is not the standard process anymore. If you now run a git freeze you will see the correct entry, # pip freeze To ensure the correct entry is included within your requirements file add the egg switch to your pip command. You may be now asking yourself “ How is the module that I have installed from Git included within my requirements file?“. Location: /opt/lib/python2.7/site-packages Running setup.py egg_info for package from git+Ĭleaning up.
To install via SSH the following syntax is used, sudo pip install install via HTTPS the following syntax is used, sudo pip install git+ Example Install # pip install git+ from setuptools import setupĪdditional documentation around building a setup.py file can be found here.
Note : If you code is located within folders use the packages keyword instead of py_modules. This file will be read by pip at the point of installation. First of all add a setup.py file to your repo.