Comphy is a Python framework provided as a 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 corresponding Comphy repository using git.
Alternatively, for those unfamiliar with git, a compressed archive containing the package can be found in the Downloads section.
Before proceeding with this installation guide, please read the license terms.
Setting up a Python environment with Comphy
Comphy can be downloaded from the corresponding Comphy repository, using git and installed using Python's default package manager pip.
This section will guide you through the necessary steps to setup a Python environment with Comphy on Linux operating systems.
Step 1: Install system compilers
To build the required dependencies for Comphy you need to install the gnu compiler collection (gcc) on your system.
Step 2: Download Comphy:
Next we want to download Comphy. The recommended way to download Comphy is to clone the corresponding repository using git.
To clone the repository open a shell and enter the following command, replacing </path/to/download/destination/> with the target path where you want to put the source code:
git clone https://tea.iue.tuwien.ac.at/InstituteforMicroelectronics/Comphy </path/to/download/destination/>
Step 3: 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 4: 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.
- For Debian/Ubuntu distributions the gnu compiler collection can be installed by executing:
sudo apt install gcc g++ gfortran
- For Fedora/CentOS distributions the gnu compiler collection can be installed by executing:
sudo yum install gcc gcc-c++ gcc-gfortran
Step 5: 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 6: 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/download/destination/>
Step 7: 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: