Installing PyCharm with Sourcery plugin

Installing PyCharm with Sourcery plugin

First version: 2023-11-27
Last version: -
Last change: -

This is a community effort. The article was created by the anDREa Support Team in their spare time. If you have found a more efficient way to approach this, please contact us and we will update the article.

Introduction

PyCharm is an integrated development environment used for programming in Python. It provides code analysis, a graphical debugger, an integrated unit tester, integration with version control systems, and supports web development with Django. PyCharm is developed by the Czech company JetBrains. In this article, we describe the steps to install PyCharm and addition of plugins such as Sourcery. Sourcery is your ever-present pair programmer. Whether you're learning a new API, deciding the optimal location for a new method, or need instant new code, Sourcery provides immediate and precise answers.

Requirements

  1. Workspace with a Windows VM.
  2. The role Privileged or Accountable Member.
  3. A Github account.
  4. Domains allowlisted:
    1. jetbrains.com (needed to download PyCharm Community IDE and plugins)
    2. python.org (needed to install a Python interpreter)
    3. github.com (to sign in to a Github account)
    4. git-scm.com (to sign in to a Github account)
    5. githubusercontent.com (to sign in to a Github account)
    6. githubassets.com (to sign in to a Github account)
    7. OPTIONAL: Any other domains needed to download desired plugins.
      1. In this example we use Sourcery, so we need to allowlist sourcery.ai.
    8. OPTIONAL: Some plugins require paid subscriptions.

Steps to install

  1. Assure you have fulfilled all of the requirements.
  2. Log in to the Windows VM.
  3. Open Google Chrome and navigate to https://www.jetbrains.com/pycharm/download/?section=windows
  4. Scroll down and download the .exe file for PyCharm Community Edition.

  1. Go through the installation wizard of PyCharm.
  2. After installation, right click on PyCharm > Run as administrator.
  3. Go to Plugins. Note that the Plugins marketplace does not load. This is due to the Workspace being behind a proxy server. We will have to explicitly tell PyCharm the proxy settings.

  1. Within the Plugins menu, click on the cogwheelHTTP Proxy Settings.
  2. Select Manual proxy configuration HTTP and fill in the following details:
    1. Host name: proxy.mydre.org
    2. Port number: 3128

  1. After clicking on OK, note that the plugins marketplace is now loading.

  1. As we're installing Sourcery in this example, search for Sourcery in the plugins marketplace and click on Install.

  1. After the Sourcery plugin is installed, go to Projects > New Project.

  1. PyCharm will ask you to install a basic interpreter like Python 3.9. Here you can set your desired settings and click on Create to install Python 3.9.

  1. To use the Sourcery plugin in your project, select the Sourcery button on the right and select Log in.

  1. This will open up a window with a code. Scroll down and click on Confirm.

  1. You can now log in to Sourcery by for example using your Github account. After it tells you that you have successfully logged in, you might have to select Opt In to proceed.

  1. Sourcery is now ready to use:

    • Related Articles

    • Domains to be whitelisted/allowlisted for known applications

      First version: 2022-11-01 Last updated: 2024-04-08 Last change: Added domains for installing Visual Studio Code extensions. Introduction This is a community effort, if you experience issues, see mistakes/updates, or have other applications that you ...
    • Connecting to GitHub

      1. Whitelisting GitHub domains Submit a ticket requesting the following domains to be whitelisted for a workspace . github.com . githubassets.com . git-scm.com .githubusercontent.com Windows VM Check that proxy settings are correct by navigating ...
    • Self-service installing apps

      Only Owners can install software on VMs in their workspaces. Dependent on the institution under which your workspace falls, you may have software available by default, through an application manager, and on-request by your institutions (Core) Support ...
    • Installing Mathworks Matlab on Ubuntu

      The "normal" matlab install doesn't work on the current anDREa Ubuntu image because the home folder uses special characters (@), unzip is not installed and mathworks.com is blocked: This is a workaround: Requirements: Advanced Member in anDREa A ...
    • Installing R and Bioconductor packages

      Recently some users experienced issues with accessing R-packages and Bioconductor-packages. The article R and RStudio has been rewritten in order to easily install R and Bioconductor-packages in your Workspace.