Comphy is a free framework provided as a Python package. This enables full control and advanced simulations with Comphy on both Windows and Linux operating systems.
The Python package can be downloaded directly from the downloads section after free registration.
This section will guide you through the necessary steps to setup a Python environment with Comphy on Linux operating systems.
Setting up a Python environment with Comphy
Step 1: Download Comphy:
First let's download Comphy from the downloads section.
Then extract the downloaded zip file to a preferred location.
In the following we assume that the source code has been unpacked into the directory </path/to/source/code>.
Step 2: Create virtual Python environment
Next we will create a new virtual Python environment for Comphy.
For this purpose, execute the following command, replacing </path/to/new/virtual/environment> with the preferred target directory where you want the new environment to be created:
python -m venv </path/to/new/virtual/environment>
Step 3: Activate Python environment
Next, activate the created Python environment.
You’ll need to use different syntax for activating the virtual environment depending on which command shell you’re using.
Step 4: Ensure pip, setuptools, and wheel are up to date
While pip alone is sufficient to install from pre-built binary archives,
up-to-date copies of setuptools and wheel are required to ensure you can also install from source archives.
To update to the latest version of setuptools and wheel enter the following command in the shell:
python -m pip install --upgrade pip setuptools wheel
Step 5: Install Comphy using pip
Finally, Comphy can be installed in the activated Python environment using pip.
The following command, builds the package into a wheel and installs the wheel, including all necessary dependencies:
python -m pip install </path/to/source/code>
Step 6: Check installation
Finally, verify that the installation was successful by entering the following command in the shell:
python -m pip list
This command lists all packages installed in the current Python environment.
If the installation was successful, you should see a entry for Comphy displaying the version number:
- On Linux using the bash shell:
- On Linux using the csh shell: