PyCharm

Download and Install

  • If you haven't already, download the latest version of Python from https://www.python.org/downloads/.

    • The default Windows install location is C:\Users\username\AppData\Local\Programs\Python\Python3n\

    • On the classroom computers you need to uncheck the box to install for all users.

  • In the classroom, use Apps Anywhere

  • At home

    • Download PyCharm

      • Community Edition is free and requires no registration.

      • Professional Edition is free for students if you register at jetbrains.com/student. It is already installed on the classroom computers.

    • Install PyCharm

Run PyCharm

    • The first time you launch PyCharm it may ask about importing settings, you can choose to not import settings.

    • Click Create New Project

      • IMPORTANT: For Location, click the folder icon on the right of the box and navigate to your OneDrive folder. Right click on your OneDrive folder and click new folder and name it Python Projects. Right click your Python Projects folder and create a new folder for your project.

      • Configure the Interpreter

        • It should just work if you choose New environment...

        • If not, the first time you create a new project in PyCharm you will need to specify the path to python.exe.

          • Click the arrow next to Project Interpreter. Click the radio button next to Base interpreter. Click the three dots next to the text box. Click the three dots next to the text box again.

          • It should be in C:\Users\username\AppData\Local\Programs\Python\Python38\python.exe

            • In the classroom, if you had any trouble installing Python you could also use C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\Simulation\Topology\tools\smapy\python3.7 but you might have some problems, like with importing

    • Click Create

    • Right click the project name (like Integration) and choose New Python File, name it main.

    • Add any Python code to the file, like by copying and pasting your code from IDLE.

    • Click the green triangle at the top right to run.

      • If you don't have a green triangle, right click on the main.py file on the left and click Run Main.

Recommended Settings

  • Set line length: File/PyCharm | Settings/Preferences, Editor | Code Style, Hard wrap at 79 and Visual guides 79

  • Change inspection severity: File/PyCharm | Settings/Preferences (Ctrl+Alt+S), Editor | Inspections | Python -> check the box | Warning

Plugins / Packages

  • Power Mode II

  • Installing packages

    • In PyCharm, you can just type import package and then click on it to automatically import

Debugging Tools in PyCharm

Debugging Python Code jetbrains

Evaluating Expressions jetbrains