Getting Started

We recommend using PyCharm and Miniconda when working with the CITYhub Python package with Windows 11. This guide will walkthrough a recommend set of steps to start using the CITYhub:

  1. Installing PyCharm

  2. Installing MiniConda

  3. Installing EnergyPlus v24.1.0

  4. Creating Project in PyCharm

Installing PyCharm

  1. Download PyCharm

Note

If you have a university email address, you may be eligible to use PyCharm Professional through the JETBRAINS Student Pack

  1. Run the installer

  2. Click Next

../../../_images/installing-pycharm-1.png
  1. Click Next

../../../_images/installing-pycharm-2.png
  1. Click Next

../../../_images/installing-pycharm-3.png
  1. Click Install

../../../_images/installing-pycharm-4.png
  1. Click Finish

../../../_images/installing-pycharm-5.png

Installing MiniConda

  1. Download MiniConda

  2. Run the installer

  3. Click Next

../../../_images/installing-miniconda-1.png
  1. Click I Agree

../../../_images/installing-miniconda-2.png
  1. Click Next

../../../_images/installing-miniconda-3.png
  1. Click Next

../../../_images/installing-miniconda-4.png
  1. Click Install

../../../_images/installing-miniconda-5.png
  1. Click Next

../../../_images/installing-miniconda-6.png
  1. Uncheck the two options and click Finish

../../../_images/installing-miniconda-7.png

Installing EnergyPlus v24.1.0

  1. Download EnergyPlus v24.1.0

Note

For Windows 11, you should select the EnergyPlus-24.1.0-XXXXXXXXXX-Windows-x86_64.exe installer

  1. Run the installer

  2. Click Next to start the installation process

../../../_images/installing-energyplus-1.png
  1. Click Next to accept the default installation path

../../../_images/installing-energyplus-2.png
  1. Click Next to install all default components

../../../_images/installing-energyplus-3.png
  1. Check the box to accept the license agreement and click Next

../../../_images/installing-energyplus-4.png
  1. Click Next to accept the default location for the EnergyPlus shortcut

../../../_images/installing-energyplus-5.png
  1. Click Install to install EnergyPlus

../../../_images/installing-energyplus-6.png
  1. Click Yes to give the installer permission to run

../../../_images/installing-energyplus-7.png
  1. Click Finish to close the installer

../../../_images/installing-energyplus-8.png

Creating Project in PyCharm

  1. Open PyCharm

  2. Check the box and click Continue

../../../_images/create-pycharm-project-1.png
  1. Click Don’t Send

../../../_images/create-pycharm-project-2.png
  1. Click Allow to give PyCharm access to the network

../../../_images/create-pycharm-project-3.png
  1. Click the New Project button

../../../_images/create-pycharm-project-4.png
  1. Select Custom environment. Choose the following options to create a virtual environment with MiniConda

  • It is generally recommended that the virtual environment matches the name of the project. In this example, the project and the virtual environment are called PythonProject

  • For Type select Conda

  • Select Python 3.12

Click Create to create the project.

Note

The CITYhub has been tested for Python versions 3.9 - 3.12. If you are unsure which version to select, we recommend Python 3.12.

../../../_images/create-pycharm-project-5.png

Note

If you receive a warning about Microsoft Defender, you can press Exclude folders to prevent Windows Defender from causing performance issues or false virus detections.

../../../_images/create-pycharm-project-6.png
  1. Now that your project has been created, here are a few useful things to note about PyCharm

  • In the top left you can find the name and the folder structure of the project

../../../_images/create-pycharm-project-7.png
  • In the bottom right you can find the name of the Miniconda virtual environment for the project

../../../_images/create-pycharm-project-8.png
  • In the bottom left you can find a handy toolbar full of tools

../../../_images/create-pycharm-project-14.png
  • Python Console can be used to see the output of your code. Print statements and errors while running code will show up here

../../../_images/create-pycharm-project-9.png
  • Python Packages can be used to manage the packages installed inside the Miniconda virtual environment

../../../_images/create-pycharm-project-10.png
  • Terminal, which uses PowerShell by default, can be used to run git commands if you are working with a Github/Gitea repository. It can also be used to manage packages inside of the Miniconda virtual environment. The terminal is recommended for more advanced users.

../../../_images/create-pycharm-project-11.png
  • Version Control is used to work with git repositories from GitHub or Gitea. For a quick understanding on how git and version control work, checkout [this short video by ByteByteGo](https://www.youtube.com/watch?v=e9lnsKot_SQ)

../../../_images/create-pycharm-project-12.png
  1. To install the CITYhub Python package, open Python Packages and search cerc-hub. Select the first cerc-hub in the list and press Install

../../../_images/create-pycharm-project-13.png

You have now created the project and installed the cerc-hub Python package.