question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

running cocotb inside a virtualenv

See original GitHub issue

I currently do have trouble to run cocotb inside a virtualenv. I can not find any example to get it running. Is it even possible?

I think one of the problems is. cocotb-config --makefiles It always points to the system installation. Even I call the venv Makefile.sim @. $(VENVACTIVATE) && include $(VENVDIR)/lib/python3.8/site-packages/cocotb/share/makefiles/Makefile.sim The cocotb-config is used multiple times in other e.g. Makefile.verilator. So it would need quite a lot of changes to get around this.

  • the cocotb version used: 1.6.2
  • the operating system and version (32/64 bit): 64bit
  • the simulator and version (32/64 bit): Verilator 4.106
  • the Python version, and where it’s coming from (e.g. system, Anaconda, self-installed, …): system 3.8

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbarrettcommented, Jul 1, 2022

No currently I do use echo “$SHELL” -> /usr/bin/zsh

Check your .zshrc.

If cocotb is installed where ever but cocotb-config will always give the same results.

That’s because when you call cocotb-config it’s finding the cocotb-config you have installed in ~/.local/ first, because it comes first in $PATH. This causes cocotb-config to output the makefiles in the cocotb install in ~/.local/ rather than your virtualenv. The reason that ~/.local/ is showing up first in your path in front of your virtualenv is likely because you are prepending it in your shell’s rcfile which is run every time a shell is exec’d.

0reactions
github-actions[bot]commented, Aug 1, 2022

Has your question been resolved? If so please close this issue. If it has not been resolved, you may need to provide more information. If no more activity on this issue occurs in 7 days, it will be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`Make` in virtualenv still links against system python · Issue #978
Create a virtualenv with the secondary python. clone cocotb; run make in cocotb folder; check the libraries that simulator.so is linked against ...
Read more >
cocotb/Lobby - Gitter
Anybody having trouble with colors in a Pycharm terminal? I'm setting COCOTB_ANSI_OUTPUT=1 but still no color. This is on Linux, Pycharm 2019.1.3. Edit:...
Read more >
Quickstart Guide — cocotb 1.3.0 documentation
Run the GUI installer and specify a directory you would like the environment installed in. The installer will retrieve a list of possible...
Read more >
Quickstart Guide — cocotb 1.7.2 documentation
Run cocotb -config --version in a terminal window to check that cocotb is correctly installed. The code for the following example is available...
Read more >
Installing the Development Version - cocotb's documentation!
After installation, you should be able to execute cocotb-config . If it is not found, you need to append its location to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found