1/13/15

Install Python on Mac

Mac by default comes with a Python 2.7 installed, but if you want to install latest version of Python, it can be down easily.

We will need to follow the below steps:

Step 1: You can either go to Python website and download the latest stable release. (Or just click here).

Step 2: Open the installer and instal Python on your Mac.

Step 3: Open Terminal and check the versions of the python that is came pre-installed by python --version. If this gives you a result of python 2.7.6 (2.7.*) then don't worry, we are not done yet.

Step 4: In your terminal if you type python, it will run the pre-installed version i.e. 2.7.*. To make our newly installed python we will have to type python3. We can make the terminal start Python 3, just by doing aliasing.

Step 5: On your terminal type open ~/.bash_profile. If this gives a "Not Found" error, just make the file by typing: touch ~/.bash_profile. This will create the file.

Step 6: After the file is created, copy the text
 alias python="python3"

Step 7: We are not done yet. To make the changes take effect, type the following in your terminal source ~/.bash_profile. This will apply the changes you made in your file.

Step 8: You are done!! Type python on terminal and let us know :)



SHARE THIS POST:

Related Posts:

  • Install Python on Mac Mac by default comes with a Python 2.7 installed, but if you want to install latest version of Python, it can be down easily. We will need to follow the below steps: Step 1: You can either go to Python website and dow… Read More
  • Python Tutorial: Strings Datatype Data stored in memory can of different types and Python like other languages have different standard data types. Sometime back we did a post on Python Numbers. Today we will be covering other standard datatypes i.e. Str… Read More
  • Python Tutorials : Data Types - NUMBERS This Post is about numbers and mathematical operations. In this tutorial we shall be covering data types, operators and type conversion. To represent 'Numbers' in python, we have int, float, complex datatypes. For condi… Read More
  • Python Tutorial : Installing IPython (Ubuntu) Hello Guys, Code 2 Learn starts off its Python Tutorial. Like Java, C++, C etc, Python is also a Programming Language. Python is a general-purpose, high-level programming language whose design philosophy emphasizes code r… Read More

0 comments:

Post a Comment