100 Days of code - The complete Python Pro Bootcamp
Learning
The current stable version 1.7.1 of cocotb requires:
sudo apt-get install make python3 python3-pip
We can use the global python installation for cocotb
. However, the better way is to create a separated environment for cocotb
to prevent any corruption on main python installation.
Here, we create our own python env inside the cocotb
working directory.
cd $PATH_TO_YOUR_COCOTB_WS
python3 -m venv venv
It creates the venv
directory. Now, check the current environment
which python3
You will notice that it still uses the global environment usr/bin/python3
Lets activate the working environment
source venv/bin/active
Now, check the current environment
which python3
New environment for cocotb is activated.
cd $PATH_TO_YOUR_COCOTB_WS
python3 -m venv venv
sudo apt-get install make python3 python3-pip
pip install pytest cocotb cocotb-bus cocotb-coverage
You may need to add to PATH
and add this line into your .bashrc
file
export PATH=/home/tesla/.local/bin:$PATH
Checking whether it is successfull or not by typing cocotb-config
sudo apt install iverilog