The procedure for requesting AWR support has changed. Please read all about the new AWR product support process.
Page tree
Skip to end of metadata
Go to start of metadata


This section highlights the benefits of using Anaconda/Miniconda in your Python workflow and how to get started with AWR, Python, and Miniconda.

Anaconda is a development platform for Python, that offers a streamlined approach to managing your Python virtual environments. Keep in mind, to use Anaconda, you need to abide by the Anaconda Terms of Service and the EULA. If you would like to go the open source route, Anaconda offers Miniconda.

This guide is geared towards the open source route by using Miniconda. Python libraries will be added via the conda-forge and pip.

How to Install Miniconda

First go to the Anaconda/Miniconda Installation Guide and click on your OS under Regular installation section. This section will be focused on Windows OS
and the Miniconda installer.

Choosing Windows for your installation, step by step instructions should appear at Installation on Windows. When you click on the Miniconda installer for
Windows link in step 1, choosing the latest stable release under Latest Miniconda Installer Links is recommended unless you have a compelling reason otherwise.

During the installation process, it is recommended to choose Just Me under installation type.

Once Python is installed, the conda-forge needs to be configured with Miniconda. 

conda-forge setup

Here is a snippet of what the instructions should look like:

Once you get conda-forge setup, please head directly to The Basics of Managing a Development Environment section before you start using Python.

The Basics of Managing a Development Environment

Your initial set of virtual environments need to be created before you start working on your first Python project. The first step is to open Anaconda Prompt and activate your base virtual environment.

The next few steps are to clone the base environment to serve as a backup, and then to clone the base again to setup a working directory. This makes it easy to delete broken environments and to restart from a fresh build if needed without having to reinstall Miniconda.

Here is a picture of the command for creating a virtual environment called base_clone from base.

Make sure to activate the base_clone environment as well as your working environment after you create them.

Once you are done, type conda env list in the Anaconda Prompt and you should see something like pictured below.

Now you are ready to start working with Python. Anytime you want to add a package to your python environment, activate your current or target working environment in Anaconda prompt and conda install packagename. It is recommended to try installing new packages from the conda-forge first, and then use pip install to install packages that were not available on the conda-forge.

Link to the full documentation for managing your virtual environment with Anaconda.

Managing conda environments

How to Unininstall Anaconda/Miniconda

Follow the steps outlined in Uninstalling Anaconda. The 2. Option B is recommended to remove all traces of the original install. This is to avoid any conflicting dependencies

when installing and uninstalling.

Be careful to not miss these crucial steps to follow Option B, then Option A, which includes deleting the environment and package folder.

Getting Python and Microwave Office Working Together

The first step is to open Microwave Office and open the example LPF_Lumped.emp.

The second step is to open Anaconda Prompt, activate your current work environment, and type pip install pyawr. We used pip install here because pyawr is not available on the conda-forge.

If you are wanting to use the windows powershell with miniconda, you need to initialize the powershell inside the anaconda prompt.

Run the example code posted below in your IDE.

import pyawr.mwoffice as mwo

awrde = mwo.CMWOffice()

NumSchem = awrde.Project.Schematics.Count
for s_idx in range(NumSchem):
	schem = awrde.Project.Schematics[s_idx]

Getting started code snippet from PyCharm IDE.

After running the code, you will see LPF printed to the console if Python and AWR successfully communicate. You may also see exit code 0 depending on your IDE.

  • No labels