PyCharm

From PrattWiki
Jump to navigation Jump to search

This is a sandbox for setting up and using PyCharm as a potential replacement for Spyder.

Installing Python and PyCharm

conda update conda
conda update --all
  • Get PyCharm for Anaconda Download page
    • Students can use the Professional Edition for free for school use
    • For the "plugiun Setup"
      • You will likely want the 64-bit launcher shortcut created
      • You will likely also want the Add "Open Folder as Project"
      • For the Start Menu Folder, leaving this as JetBrains is fine
      • Pick your theme; there is more information below about different ways to configure appearance
      • You will not need any of the additional plugins.
      • You will not need any of the additional tools.
  • At "Welcome to PyCharm" window, click "Configure" at bottom right and then "Settings"
    • Project Interpreter
      • At top right, click settings gear icon and then Add
        • In Conda Environment, pick latest Python version available
        • Select the path to Conda Executable and navigate to something similar to:
C:\Users\USER\AppData\Local\Continuum\anaconda3\Scripts\conda.exe
  • Once you navigate to your USER folder, you may have to manually type "AddData" in the path window since that folder is typically hidden.
  • After that is added, there should be a list of packages; you will need to add some to this so click the + near the top right. Once the available packages window comes up, you will want to add:
  • numpy, scipy, matplotlib, pandas
  • Build, Execution, Deployment
    • In Console, pick "Use existing console"


Starting a new project

  • Create New Project
    • Pick or create a new folder to work in
    • Use existing interpreter for newest version of Python

Once the project window opens and after indexing is complete:

  • From View menu, pick Scientific mode
  • From File menu, pick New then Python File. Give the file a name and hit return.
  • In File, go to Settings
    • Tools -> Python Scientific -> Uncheck Show plots in tool window

Most of the time when you change settings you will need to restart the console for them to be applied.