Installing Anaconda Python Distribution and PyCharm IDE to Setup a Python Development Environment

Introduction

This article is about installing Anaconda Python Distribution and PyCharm IDE to setup a Python Development Environment.

The steps described here should work on Windows/7/8/10 machines.

Installing Anaconda Python Distribution

Step 1:

Go to the link below

https://www.continuum.io/downloads

You have the option to download either Python 2.7 distribution (32 bit or 64 bit) or Python 3.4 distribution (32 bit or 64 bit). At the time of writing this article Anaconda Supported Python 3.4 distribution. In future it’ll be updated to the latest version of Python.

For our demo, I have downloaded Anaconda Python 2.7 distribution (64 bit).

Step 2:

Click on the Anaconda Python distribution Anaconda-2.2.0-Windows-x86_64.exe (the versioning number may be different when you download) which you have downloaded. As seen in the below screen the setup starts loading.

1

Step 3:

You will get a screen as shown below. Click Next.

2

Step 4:

You will get a License Agreement Screen. Click on I Agree.

3

Step 5:

Assuming that you are the only User on your System, select Just Me radio button. Click on Next.

5

Step 6:

You need to choose an location to install Anaconda Python distribution. The default installation will be under Users as shown below.

6

Lets change the installation path as show in the below screen. Click on Next.

7

Step 7:

In the Advanced Installation Options screen, select all the check boxes.

8

Step 8:

This starts the installation of Anaconda Python Distribution.

9

Step 9:

Once the Installation is complete click on Next button.

10

Step 10:

Finish the setup.

11

Step 11:

To check whether the installation is working properly or not, go to the command prompt and type python. You should see a series of lines and a prompt as shown in the screen below.

12

Installing PyCharm IDE

Step 1:

Go to the link below

https://www.jetbrains.com/pycharm/download/

You have the option to download either the PyCharm Professional Edition or the PyCharm Community Edition. If you have purchased an license for Professional Edition then go for it. Else, you can download the Community edition which will suffice most of our requirements.

Create a folder called PyWork in C:\ Drive.

Step 2:

Click on the executable which you have downloaded. You will be presented with the below screen. Click on Next.

1

Step 3:

Go with the default destination folder to install PyCharm Community Edition. Click on Next.

2

Step 4:

Select all the Check Boxes in the Installation Options and Click on Next.

4

Step 5: Go with the default Start Menu Folder as shown in the screen and Click on Install.

5

It’ll take some time for the installation to finish.

6

Step 6: Once the installation is over click on the Finish button.

7

Step 7: You will be asked whether you want to import previous PyCharm settings. Since we are starting on a clean slate, lets select the second radio button and click on OK button.

8

Step 8:

You will be prompted with a Windows Security Alert. Do not worry about it. Click on Allow Access Button.

9

Step 9:

You will be presented with the below screen. Let the default settings remain as it is and click on OK button.

10

Step 10:

In the next screen, go to Configure and select Settings.

11

Step 11:

In the Default Settings screen, on the left pane, expand the Default Project option and click on Default Interpreter.

12

On the right pane, in the Project Interpreter option, click on the pull down menu and select the python path and click Apply button.

13

Step 12: It will take some time for all the packages to be listed.

14

Once done click on OK button.

15

Step 13:

You will be again presented with the Welcome screen. Click on Create New Project option.

16

Step 14:

For the Location option, browse to the PyWork folder which you created in C:\ drive in Step 1. Now give a name to your Python Project. For the purpose of demo, I have given the Python Project name as FirstProgram.

You should always create different projects for executing different Python Programs.

Click on Create button.

17

Step 15:

On the left pane of the presented screen you can see the Project Name. Right click on the FirstProgram ⇒ Select New ⇒ Select Python File.

18

Step 16:

Give a name to the Python File. In our case it is HelloWorld. No need to specify the extension. The IDE itself will attach the .py extension to the file name which you have specified.

Click on OK button.

19

Step 17:

On the left pane double click on the File name which you have created (in our case it is HelloWorld.py). On the right side of the editor type

print ‘Hello World’

20

Step 18:

To execute the above program, go to Run menu ⇒ Click on Run

21

Another way of executing the above program is, Right Click on the Python File Name (in our case it is HelloWorld.py) and select Run “HelloWorld”

22

 

Step 19:

In the below screen, you can see the output in the bottom pane of the PyCharm IDE.

23

Step 20:

You can add multiple Python files to the project and execute them individually.

Create another Python File by following the Steps 15, 16 and 17. Name the Python file as SecondPythonFile.

In the editor type

print ‘This is second File’

Right click on the SecondPythonFile.py file and select Run “SecondPythonFile”

You can see the output in the bottom pane of the IDE.

24

That’s all folks.

Hope you enjoy setting up the Python Development Environment.

Happy Coding !!!!!

Comments

  1. Hello, Gowish !

    I have an Pycharm (x64) and try to run Python 2.7.11 x 64 (from Anaconda package) and i get the error..

    ImportError: DLL load failed: %1 is not a valid Win32 application.

    do you know how i can fix it ? :s

Leave a Reply

Your email address will not be published. Required fields are marked *