Apple’s Mac OS comes with python 2.7 installed by default. Perhaps you may want to use python 3.x.x on your machine and also use pip for package management with python 3.x.x.
The easiest way to achieve this is by:
Pip is a tool for installing and managing Python packages. As well as Python, pip can be install on various operation systems: Linux, Mac, Windows, etc. In this post i am showing how to install pip on MacOS and how to install pip on Linux (Ubuntu and CentOS). The command to install pip on Linux will vary based on the distribution you're using (and the package manager). Below I'll list the common package managers. APT (Advanced Packaging Tool) Python 2.x sudo apt-get install python-pip Python 3.x sudo apt-get install python3-pip Pacman Python 2.x sudo pacman -S python2-pip Python 3.x sudo pacman -S. Pip install notebook Congratulations, you have installed Jupyter Notebook! To run the notebook, run the following command at the Terminal (Mac/Linux) or Command Prompt (Windows). Apple’s Mac OS comes with python 2.7 installed by default. Perhaps you may want to use python 3.x.x on your machine and also use pip for package management with python 3.x.x. The easiest way to achieve this is by: NOTE: This tutorial does not use Virtual Environments like virtualenv or pyenv to manage various python versions.
NOTE: This tutorial does not useVirtual Environments like virtualenv
or pyenv
to manage various python
versions
1. Installing python3
- Follow this link and download the latest
python3
OS X
package - Run the package and follow the steps to install
python3
on your computer. - Once the installation is done, on your
Terminal
, run
This will print out the version of python installed on your system. The output should be similar to:
You may verify the installation directory of python
by runningthe following line on the Terminal
.
The prompt should print the install path for python3
. An example output is:
2. Install pip3
:
- Securely download the
get-pip.py
file from this link - From the directory where the file was downloaded to, run the following command in the
Terminal
- Once the installation completes you should see the prompt print message similar to this
- Verify the installation of
pip3
by running the following on theTerminal
This should return the install location of pip3
.
- To install
python3
packages usingpip3
, run
Remember to replace packageName
with the appropriate package name for your case.
Pip Install To Python 2.7
Happy Pythoning!