How To Install Python Development Tools On MAC?


0

As an absolute Python web development beginner in programming, learning cool things using Python interpreter & simple Python scripts is an excellent task. However, you will eventually need tools to expand more complex projects.

For me, the hardest thing is to branch out the best Python development tools. Moreover, you must know how to interpret their install instructions. Also, how a top Python web development company can help your way out in Python on MAC!

Below is the list of tools to get the Python development set up on a Mac. Once you installed the python in mac then it will be pretty easy to run python script on MacOs.

I’ll explain all the lines of code so that you learn a little bit about working with command lines easily on the latest Mac OS X versions since 10.7.

INSTALL XCODE

Xcode, Apple’s Integrated Development Environment (IDE), which is pretty significant to download from Apple Appstore. Once the IDE is downloaded, start installing the Xcode!

Once Xcode gets installed, you now have to install Apple command line tools!

Under the Xcode MAC development tool for Python, go to the menu & click preferences. On the window, which pops up with the click, go to the Downloads tab & find “command lines tools.”

Finally, click the install button.

OPEN TERMINAL GET COMFY.

It actually is a command-line interface, which is a place for storing all your programming projects in a separate folder. Let’s name the folders as CODE!

To make a new folder Code, open up your Terminal go to the home directory and type the following in your Terminal window: $ cd

It is a Command-line instruction that always starts with $ and represents the end of your prompt. A prompt is a group of characters or better say strings of characters.

The cd means change directory. Now, if you fail to specify a directory, then $ cd sends you to your home directory.

In order to make a folder CODE, type: $ mkdir Code
The mkdir refers to ‘make a directory’.

If you make directory via your command line, it shows up as a folder in Finder. mkdir specifies a string which is the name of the new directory. As a result, passing Code argument is easy.

Unlike cd, mkdir also can give an error if we don’t provide a name.

Below we have shown an example that tells the wrong usage of mkdir. Anything in brackets is optional, but the directory name is not!

$ mkdir usage: mkdir [-pv] [-m mode] directory.

INSTALL HOMEBREW

Homebrew is a package manager for Apple’s Mac OS X, which is a collection of code files. By installing it, you run scripts to put certain files in the directories.

Many packages have dependencies on each other.

Homebrew finds and installs these packages, organizes them in one location; moreover, it tells you about their available updates. Additionally, it gives helpful instructions to make python mobile app development and web development projects on MAC smooth.

To install Homebrew, use the following code:
$ ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”

The URL is a Ruby script that informs the computer to install Homebrew. A curl is a command-line tool helpful in transferring files using URLs. The -fsSL handles the file present in the URL.

After you are done writing the code, you have to execute this Ruby script! The -e is a flag for ruby to execute strings as a one-line code.

Installing homebrew, fetching codes, etc. is setting up the stage to install Python development tools on MAC. The next step greatly belongs to your use, as we will now teach you to install Python.

INSTALL PYTHON

Python comes with OS X. Type Python –version into Terminal!

If you get an error message, then install Python. If the Terminal prints “Python 2.7.3 where the exact numbers are different, directly move on to step #5.”

For some reason, you want to get the current version of Python, leave it to Homebrew! It automatically works on the latest Python tools on MAC.

For installing the latest version of Python, type: $ brew install python. The latest version will get installed it automatically.

INSTALL PIP

PIP is one of those few package managers which is specific to Python! It stands for “pip installs packages”. It has one dependency–distribute and is easily installed with those python scripts which are available on the web. Use Curl;

$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ python get-pip.py

This time we are executing each script in two commands. There are chances that you will face some performance issues. Each file at your computer stores information to access and modify.

The get-pip.py script writes files to your system directories. Might be your user account doesn’t have the right permission.

INSTALL VIRTUALENV

A virtual environment is useful whenever you involve with projects having different or conflicting dependencies. For example, you would like to use a library that requires a top Python development company in USA while working with Python’s old and new versions.

To install virtualenv, simply type the following strings: $ pip install virtualenv

You have a lot of powerful Python development tools on MAC. Learning all the tools at a time can take more time of yours. Hence the best way is to hire Python developers who are also experts and dedicated to MAC OS programming.

Don’t forget to tell us in the comment section if you find better ways to make Python development tools work in MAC!


Tags:

Like it? Share with your friends!

0
James Burns

James Burns is the Founder and CEO of CMS Website Services, a globally ranking web development and Top mobile app development company which also performs best practices in mobile application development. With 10+ years of experience in designing, development, implementation & maintenance of high quality global redundant, compliance-ready applications, network and Data Centers for private and Govt organizations, I have all solutions to your IT problems as a tech-business person.