cocotb: Unable to open lib libpython3.4.so

Hi,

I’ve just installed cocotb (11th May) on a ubuntu machine and I’m having trouble running the example testcase e.g. endian_swapper with Icarus (0.9.7). Im using v3.4 of python, make v3.81. Do I need to declare some additional environment variable with python v3.4? An earlier cocotb was working when I had python 2.7

Here is the error from the make command

vvp -M /home/damian/Projects/Work/NXP/cocotb/build/libs/i686 -m gpivpi sim_build/sim.vvp
Unable to open lib libpython3.4.so (libpython3.4.so: cannot open shared object file: No such file or directory) Failed to find python lib -.–ns INFO cocotb.gpi GpiCommon.cpp:47 in >gpi_print_registered_impl VPI registered Traceback (most recent call last): File “/home/damian/Projects/Work/NXP/cocotb/cocotb/init.py”, line 41, in <module> import cocotb.handle File “/home/damian/Projects/Work/NXP/cocotb/cocotb/handle.py”, line 46, in <module> import simulator ImportError: /home/damian/Projects/Work/NXP/cocotb/build/libs/i686/simulator.so: undefined symbol: PyModule_GetState Failed to load “cocotb”

Great project any help appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

That’s it. I see from your link that you have the same warning but like you said it’s not the source of the problem. The python-config I had was v2.7 and my python is v3.4, I fixed this by adding this link

     ln -s /home/damian/anaconda3/bin/python3.4m-config /home/damian/anaconda3/bin/python-config

The endian swapper works now. Thanks for your help 😃