How to setup Python for Computer Science Classes
Overview
The following instructions have been written by Kevin Angstadt and are up to date as of September 2024.
Follow these steps carefully to duplicate the classroom programming environment on your personal computer. If you run into trouble, please contact the IT Help Desk.
Instructions
Windows Instructions
- Set up OneDrive:
- Follow these instructions to set up OneDrive on your computer. You will be saving all of your Python files on OneDrive to avoid losing all your work if your computer breaks during the semester. (This has happened every semester I've taught 140!)
- Get the Python Interpreter:
- Click this link to download the installer.
- Open the installer, python-3.12.4-amd64.
- Check Add Python 3.12 to PATH and click Install Now.
- Get the Pycharm Editor:
- Make sure your project works:
- Open your JetBrains Pycharm Community Edition program and click through the setup. You shouldn't need to change any of the defaults. Open your existing project folder found in your OneDrive folder.
- Python will likely not be set up correctly for this project when it first opens. If you try to run a program and a window pops up or you see a (warning message about the Python interpreter in the main editor), cancel out of the pop up window and then:
- Click the gear at the top right of the window and choose "Settings".
- In the menu on the left side of the preferences window, select the option that begins with "Project".
- Click "Python Interpreter" .
- Next to the interpreter dropdown in the main part of the window, click "Add Interpreter" and select "Add Local Interpreter...".
- Choose "System Interpreter" in the left menu and then make sure Python 3.12 is selected in the dropdown on the right side.
- Click OK and then OK again.
- You should now be able to run python files from class on your personal computer.
Mac Instructions
- Set up OneDrive:
- Follow these instructions to set up OneDrive on your computer. You will be saving all of your Python files on OneDrive to avoid losing all your work if your computer breaks during the semester. (This has happened every semester I've taught 140!)
- Get the Python Interpreter:
- Click this link to download the installer.
- Open the installer, python-3.12.4-macos11.pkg.
- Click through the setup. You shouldn't need to change any of the defaults.
- Get the Pycharm Editor:
- Click this link to download the installer.
- Open the installer, pycharm-community-2024.2.1.dmg (or similar)
- Drag the PyCharm application to your Applications folder. You can now eject the disk image.
- Make sure your project works:
- Open your Pycharm program and click through the setup. You shouldn't need to change any of the defaults. Open your existing project folder found in your OneDrive folder.
- Python will likely not be set up correctly for this project when it first opens. If you try to run a program and a window pops up or you see a (warning message about the Python interpreter in the main editor), cancel out of the pop up window and then:
- Click the gear at the top right of the window and choose "Settings".
- In the menu on the left side of the preferences window, select the option that begins with "Project".
- Click "Python Interpreter" .
- Next to the interpreter dropdown in the main part of the window, click "Add Interpreter" and select "Add Local Interpreter...".
- Choose "System Interpreter" in the left menu and then make sure Python 3.12 is selected in the dropdown on the right side.
- Click OK and then OK again.
- You should now be able to run python files from class on your personal computer.