I spent most of the day yesterday searching for a clear answer for installing pip
(package manager for Python). I can't find a good solution.
How do I install it?
I spent most of the day yesterday searching for a clear answer for installing pip
(package manager for Python). I can't find a good solution.
How do I install it?
NEW 2016 December: This worked for me on OS X v10.11 (El Capitan):
Mac comes with
python 2
, but not with pip.Requirements
Steps:
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
With this I got these errors (but I've solved them in step 3):
The directory
'/Users/myuser/Library/Caches/pip/http'
or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may wantsudo's -H flag
.The directory
'/Users/myuser/Library/Caches/pip'
or its parent directory is not owned by the current user and caching wheels has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may wantsudo's -H flag
.pip install --upgrade pip
Finally you can install an app like:
pip install couchapp
UPDATE:
Python 3
If you install
python 3
, pip will be installed automatically.You need only to upgrade pip, but before that you need create a virtual environment to work with Python 3. You can use a project folder or any folder:
Check the versions:
To deactivate the environment:
To install or upgrade pip, download get-pip.py from http://www.pip-installer.org/en/latest/installing.html
Then run the following:
sudo python get-pip.py
For example:
If you want "pip3" you can do the ff:
then you can execute
pip3 <command> [options]
You can install it through Homebrew on OS X. Why would you install Python with Homebrew?
Homebrew is something of a package manager for OS X. Find more details on the Homebrew page. Once Homebrew is installed, run the following to install the latest Python, Pip & Setuptools:
I'm surprised no-one has mentioned this - since 2013, python itself is capable of installing
pip
, no external commands (and no internet connection) required.This will create a similar install to what
easy_install
would.I recommend Anaconda to you. It`s the leading open data science platform powered by Python. There are many basic packages installed.