Installing the library

  1. Download an archive matching your OS and Python version from the (release page).

  2. Extract the archive to a location of your choice

  3. Set the environment as described below.

Note

Note that the Python installation on the target OS must include Python shared libraries. PyStim utilizes these shared libraries to embed the Python interpreter.

The environment setup file is located in the extracted directory and is named scripts.

export PY_STIM_INSTALL_DIR="<extracted_location>"

# or source the environment file
source <extracted_location>/scripts/environment.sh

<extracted_location> location should include the pystim files (lib, system_verilog, and ect.).

Verify the installation for QuestaSim by running the following command:

cd $PY_STIM_INSTALL_DIR/examples/hello_world
source ../../scripts/environment.sh
./run.sh

To enable Python to find your project’s modules and files, you need to add the directory containing them to the PYTHONPATH environment variable. Python searches these directories when looking for imports.

export PYTHONPATH="$PYTHONPATH:<path to the yours python files>"