3.4.5. Setting up Windows Environment Variables for RMG

Setting environment variables in Windows allows for easier shortcutting and usage of RMG scripts and packages. Setting the RMGPy variable

  1. If you have a search bar available in your start menu, search for “environment variables” and select “Edit environment variables for your account”. Alternatively, navigate to this settings window by first going to “Control Panel > System”, then clicking “Advanced system settings”.

  2. Once the “System Properties” window opens, click on “Environment Variables…” in the “Advanced” tab.

  3. Once the “Environment Variables” window opens, click on “New” under the “User variables”.

  4. Set a new variable with the name RMGPy with the appropriate value directed at your RMG path.

    If you installed the binary version of RMG, the environment value should be set to:


    where C:\Anaconda can be replaced by wherever your Anaconda was installed.

    Your screen might look like this:


    If you are installing RMG by source, you can similarly set your RMGPy variable to the source directory, such as

  5. Click “Ok” on all screens to confirm the changes.


If you set any new environment variables, you must close and reopen any command prompts previously open before the changes can take effect. Optional: Setting a Permanent Anaconda Environment for RMG

If you use Anaconda solely for RMG, it may be more convenient to set your PATH variable to be permanently directed to the RMG environment. This will allow you to run RMG easily without having to type activate rmg_env in the command prompt every time.

Similarly to setting the environment variable for RMGPy, go to “Edit environment variables for your account” and click edit on the PATH variable. Replace the paths containing the Anaconda main directory with the RMG environment in Anaconda.

For example a path such as


should be changed to:


Note that C:\Anaconda should be wherever your Anaconda was installed.