0% found this document useful (0 votes)
43 views18 pages

Lecture 04 - Installation PyCharm

This document provides instructions for installing PyCharm and running a simple Python program. It involves downloading and running the PyCharm installer, selecting installation options, and creating a new project. The user is then guided to create a "Hello World" Python file and run it using PyCharm's integrated development environment. Troubleshooting steps are included to help if the Python interpreter is not detected during project configuration.

Uploaded by

Adit Sanur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views18 pages

Lecture 04 - Installation PyCharm

This document provides instructions for installing PyCharm and running a simple Python program. It involves downloading and running the PyCharm installer, selecting installation options, and creating a new project. The user is then guided to create a "Hello World" Python file and run it using PyCharm's integrated development environment. Troubleshooting steps are included to help if the Python interpreter is not detected during project configuration.

Uploaded by

Adit Sanur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Installing PyCharm

1) Go to www.jetbrains.com/pycharm
2) Click the “Download” button at top left (you can also scroll down the page and click the download link for the
community version directly)

3) Click the “DOWNLOAD” link under the Community edition

7
4) When the download box pops up, click “Save” and then “Run”.
a. Depending on your computer’s setup, you might need to enter an administrator password at this point.

8
5) The setup wizard should have started. Click “Next”

6) Choose an installation location. I recommend letting it install in the suggested location. Click Browse if you
want to enter a new location, and when you are done selecting the location, click “Next”.

9
7) You can choose to select two options, after which you click “Next”
a. You can create a desktop shortcut (I suggest doing so). This will put a link to PyCharm on your desktop.
b. You can create associations (I suggest doing so). This means that when you open a python file (one with
a .py extension), it will open in PyCharm

8) Choose a start menu folder (I suggest leaving the default “Jetbrains” selected, but you can change it if you wish)
and click “Install”

10
9) Wait for installation to finish. At the end, you should receive a message screen that PyCharm is installed. You
can click “Finish”, and if you want to go ahead and run it, click the “Run PyCharm Community Edition” box first.
You have now installed PyCharm

11
Running PyCharm
1) The first time you run PyCharm, you will get a message box asking about importing settings. You can select
“I do not have a previous version of PyCharm or I do not want to import my settings” and click “OK”

2) The first time you run PyCharm, you will need to accept the privacy policy.

3) The first time you run PyCharm, you will have some “Initial Configuration” options. Just hit “OK”

12
4) You will now be at the intro screen for PyCharm. This will also be the intro screen when you start PyCharm
in the future without a recently opened project (if you do have a recently opened one you did not close
before exiting, it will automatically reopen to that one). Click on “Create New Project”

5) You will need to select a location.


a. When it asks for the location, you can select where you want the project to be created. I suggest at
least changing the name from “untitled” to something more meaningful, like “FirstProject”
b. PyCharm should have found the Python interpreter you installed earlier (when you installed Python
itself). It will be selected if so. See TROUBLESHOOTING below for what to do if you do NOT have
an Interpreter listed. If you do not have an interpreter listed, you need to resolve this before you
can continue.
c. Click the “Create” Button when you have the project set up

13
6) This will bring up the PyCharm environment (you can close the “Tip of the Day”) box that pops up

14
7) Try creating and running a program. Go up to the “File” menu and select “New”

15
8) Select “Python File”

9) Type the name of the file you want (for example “FirstTest”) and hit “OK”

16
10) A new screen will pop up with the FirstTest.py file visible.

17
11) Go ahead and type in a simple program, like: print(‘Hello, World!’)

18
12) Go up to the “Run” menu and select “Run”(with the green arrow) to run your program:

19
13) Select the name of your file that you will run (in the example, that’s “FirstTest”):

20
14) You should see the output of your program (in this case, the words Hello, World!, at the bottom of the
screen:

That’s all – you are ready to write programs using PyCharm.

21
TROUBLESHOOTING:

If you do NOT have an interpreter listed, it means that PyCharm did not find a Python interpreter on your computer.
You will see a window like this:

A) Did you install Python before installing PyCharm? If not, you need to go ahead and install Python! Close the
PyCharm window and go back to do that first.
a. You should make sure the installation completed and that you can run IDLE
b. This is the most common reason that nothing is found. Once it is installed, go back and start
PyCharm again, and it should find your Python interpreter.

B) If you are even slightly unsure if you installed it, try installing it again. If you have it installed already, you
should get a screen like this when you try to install:

22
C) If you are sure you installed Python (and can test it by running IDLE), you will need to find the location
where the python interpreter, usually named “python.exe” is installed. There are a few ways to do this:
a. Try looking in a standard installation location, (where ***YOUR USER NAME** is your user name –
mine is keyser for instance) like:
C:\Users\***YOUR USER NAME***\AppData\Local\Programs\Python\Python35-32\python.exe
b. If you noted the location when you installed Python (or you specified your own location), you should
be able to note that, and use that location
c. Do a search on your computer for python.exe:
i. Open up the file explorer by typing “explorer” into the text box at lower left of your
Windows system, and select File Explorer (not Internet Explorer)
ii. At the far left, click on “This PC” or “Windows (C:)”
iii. In the upper right, in the box labeled “Search This PC” or “Search Windows (C:)”, type
“python.exe”
iv. There should be a file called “python” or “python.exe” found on your computer. That will
be the one to use. Find the folder location for that file.
d. If you can’t find it by any of these means, try to install Python again:
i. When you first try to install, you should see the screen in (B), above.
ii. Choose “uninstall” and let it uninstall your current Python installation
iii. Then try to install, again. This time, choose “Customize Installation” when installing, and
select a location you will be able to remember, such as C:\Program Files.
iv. If you reinstall Python, try restarting PyCharm to see if it finds the interpreter automatically;
if not, you will know the location to tell it to look.

D) Once you know the location of your python interpreter, you will click on the little settings icon (that looks
like a gear wheel) next to your “Interpreter” box. There should be a link saying “Add Local” that pops up
when you do that – click on it.

23
E) This will bring up a file navigation window. You will need to go to the location of your python.exe file.

F) When you have selected the location of your python.exe file, hit “OK”

G) You are now OK to continue as above.

24

You might also like