Home Python Course Menu Book

Install PyCharm

 

You can type and run your code from a Terminal window or Command Prompt. But that's very tedious. Instead, we're going to be using a piece of software called PyCharm. This is an IDE created by JetBrains. You can get versions for Windows, Linux and Mac. The page to download the software is here:

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

Click the Download Now button and it should detect your operating system. There is a free version called Community, and this is the one we'll be using. Download and install the software. It's fairly straightforward.

You'll see a screen like this one when installing (Linux users, scroll down for your install):

PyCharm installer

You can check the three boxes at the top. We've left the last one unchecked. JRE is the Java Runtime Environment. We already have this. And in any case, JetBrains say you don't need Java to run PyCharm on Windows and Mac.

One more screen you might see is this:

PyCharm installation screen

We don't have a previous version of the software so have selected Do not import settings.

Install PyCharm on a Mac

Once you've downloaded the software, installation is just a question of double-clicking the file you've downloaded. Once it's been installed, you should see PyCharm in your Application folder, or be prompted to drag an icon there.

If you're not using Linux, scroll down to the bottom of this page and go to the next lesson, Launch PyCharm (or use the menu on the left).

Install PyCharm on Linux

Installation of PyCharm can be a little bit tricky. But download the software. You'll be downloading a tar.gz file. Double click the file and let the Archive Manager extract the files. Click the Extract button on the Archive Manager: (All images are from Linux Mint. Ubuntu users should see something similar.)

The Archive Manager in Linux Mint

Click the Extract button top left. Then go to the folder you've just extracted.

Now double-click the Pycharm Community folder once you've extracted the files:

PyCharm Community folder on Linux Mint

Inside of the PyCharm folder, double-click the bin folder:

The PyCharm bin folder

Inside the bin folder, locate the file called pycharm.sh:

The pycharm.sh: file

Double-click this file. You may see a dialog box asking you if you want to run the file. Click the Run button:

Running a sh file in Linux

Hopefully, Pycharm will then start up. From now on, you need to double click the pyharm.sn file in the bin folder whenever you want to fire up Pycharm. Or you can create a launcher for it from your desktop. (See below, if you're not sure how to do this.)

If Pycharm doesn't start, and you get an error about JDK 8 not being installed, then it means you haven't got the Java Development Kit on your system. In which case, try the following:

Open up a Terminal window. Type the following (or copy and paste from here):

sudo add-apt-repository ppa:webupd8team/java

Now type this:

sudo apt-get update

And then this:

sudo apt-get install oracle-java8-installer

If eveything goes well, return to your pycharm/bin folder and double click the pycharm.sh file again. Better yet, add a Desktop shortcut for PyCharm. See the next lesson below, if you're not sure how to do this.