How do I install pip on macOS or OS X?
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?
你所需要做的就是
sudo easy_install pip
You can install it through Homebrew on OS X. Why would you install Python with Homebrew?
The version of Python that ships with OS X is great for learning but it's not good for development. The version shipped with OS X may be out of date from the official current Python release, which is considered the stable production version. (source)
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:
brew install python
⚡️ TL;DR — One line solution.
All you have to do is:
sudo easy_install pip
Complimentary GIF.
Details:
⚡️ OK, I read the solutions given above, but here's an EASY solution to install pip
.
MacOS comes with Python
installed. But to make sure that you have Python
installed open the terminal and run the following command.
python --version
If this command returns a version number that means Python
exists. Which also means that you already have access to easy_install
considering you are using macOS/OSX
.
ℹ️ Now, all you have to do is run the following command.
sudo easy_install pip
After that, pip
will be installed and you'll be able to use it for installing other packages.
Let me know if you have any problems installing pip
this way.
Cheers!
PS I ended up blogging a post about it. QuickTip: How Do I Install pip on macOS or OS X?
链接地址: http://www.djcxy.com/p/4484.html下一篇: 我如何在macOS或OS X上安装点子?