Skip to content

Pre‐work for Virtual ARMI Workshop

Nick Touran edited this page Aug 10, 2023 · 2 revisions

Strongly Suggested Preparation for ARMI Workshop

We're excited for you to join us for the ARMI Workshop. You can feel free to do a little bit of pre-work to make sure your computer is all ready to run ARMI in advance.

Wait what is ARMI?

You can read some introductory material about what ARMI is and who it's intended for at the ARMI Manual

Verifying that you have Python 3.9 -- 3.11

ARMI can work on any computer with Python 3.9 to 3.11. You can check by opening a command line (in Windows, press Start, type "Command", and click the Command Prompt app) and running python -VV to print out the version (if it doesn't work, try python3 -VV instead):

C:\users\yourname> python -VV 
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]

If you do not have a Python interpreter installed or have a version less than 3.9, we recommend installing Python 3.11.

  • On Windows, get and install Python from the downloads page. Important on Windows: Ensure you get the 64-bit version because it will make the dependencies easier to install (specifically h5py). The Windows app store version of Python3 seems to be 32-bit, which will slightly complicate ARMI installation (see Troubleshooting below).

  • On Debian-based Linux, you can run sudo apt install python3

  • On MacOS, we recommend you follow these instructions to get the homebrew package manager and then use it to get python 3 with a command along the lines of brew install python@3.8

The deliverable from this step is that you should know the proper Python 3 command on your machine. It will be along the lines of one of the following, and you will need to use it below in creating your virtual environment.

  • python
  • python3
  • C:\Users\ntouran\AppData\Local\Programs\Python\Python311\python.exe
  • C:\Program Files\Python311\python.exe
  • something else?

Make sure you know which Python on your machine is a Python 3.9 -- 3.11 version, preferably 64-bit.

Make a ARMI-specific Python 3 Virtual Environment

Once you have the proper version of Python installed, you'll want to make a ARMI-specific Virtual Environment. You may want to peruse the Python Virtual Environment documentation if you haven't encountered them before. Here are the steps:

  • Choose a folder where you want to make your virtual environment. On Windows, maybe something like C:\users\yourusername\venvs\armi-venv is a good choice (replace yourusername with your actual user name 😉).

  • Create the virtual environment there by running a command like: C:\> python -m venv C:\users\yourusername\venvs\armi-venv

    Tip: use the right version of Python on your machine as determined above. For a full path, try something like C:\> C:\Users\yourusername\AppData\Local\Programs\Python\Python311\python.exe -m venv C:\users\yourusername\venvs\armi-venv

  • Activate the virtual environment by running the activate script: C:\> C:\users\yourusername\venvs\armi-venv\Scripts\activate

    Note: On Mac or Linux, the activation command will look more like: $ source /path/to/armi-venv/bin/activate

At this point, your command prompt should have a (armi-venv) prefix. When the virtual environment is active, the python command will always work and will always point to the right version (determined above). You can double check your version:

(armi-venv) C:\Users\ntouran>python -V
Python 3.11.4

Tip: The official ARMI installation instructions are also available online here: https://terrapower.github.io/armi/installation.html

With that, you should be all set. We will install ARMI itself in the workshop.

Installing ParaView for viewing output

It's fun to view the results of an ARMI run with a 3-D visualization tool like ParaView or VisIT. The workshop will include visualization of ARMI results with Paraview, so it is recommended that you install it prior to the workshop (the latest 5.9.0 version seems to fix a bug with opacity in our cases, so considering upgrading if you have an older version). Note that we will focus on Paraview in the workshop, but if you know and prefer VisIT, that will work as well.

Additional tips

  • If possible, we do recommend that you have two screens available so you can see our computer while also typing on yours.
  • We have a "live" copy of these instructions on a wiki page here that we will update with corrections or more tips as the workshop approaches. Check it for updates if you run into trouble, as we may have updated the instructions.
  • If you run into trouble with these steps, feel free to email armi-devs@terrapower.com in advance and we'll try to help.

Thank you for your interest. We hope the virtual workshop will be a fun and worthwhile event.

Troubleshooting in prep work

SyntaxError making venv

If, during creation of your virtual environment, you get an error like SyntaxError: unexpected character after line continuation character, then you are running this command from within a Python interpreter (with a >>> prompt). You should exit out with exit() and run this command from the main system terminal (with a C:\> or $ prompt).

Troubleshooting during workshop

h5py build issues on Windows 32-bit

If you get a build failure for h5py dependency and you're using a 32-bit Python 3 build rather than 64-bit, you can download a pre-built binary from here and install it from within your virtual environment with a command like:

pip install h5py‑2.10.0‑cp39‑cp39‑amd64.whl

Installing wxpython

Wxpython is an optional dependency that we will try out briefly for the ARMI grid GUI editor (a minor but fun feature). It often installs easily with pip install wxpython in your virtual environment, but has trouble sometimes on Linux.

In Linux, you can often install it at the OS level with a command along the lines of: sudo apt-get install python3-wxgtk4.0 python3-wxgtk-webview4.0 python3-wxgtk-media4.0 (will be different for different distributions).

If you're running in WSL (Linux on Windows), then this may be even more challenging.

Links you'll want to have handy during the workshop