0
[root@TTOOMM /home/root/ic_prjs/cocotb_test/cocotb/examples/simple_dff]$cocotb-config
usage: cocotb-config [-h] [--prefix] [--share] [--makefiles] [--python-bin] [--help-vars] [--libpython] [--lib-dir] [--lib-name INTERFACE SIMULATOR] [--lib-name-path INTERFACE SIMULATOR] [-v]

options:
-h, --help show this help message and exit
--prefix echo the package-prefix of cocotb
--share echo the package-share of cocotb
--makefiles echo the package-makefiles of cocotb
--python-bin echo the path to the Python binary cocotb is installed for
--help-vars show help about supported variables
--libpython Print the absolute path to the libpython associated with the current Python installation
--lib-dir Print the absolute path to the interface libraries location
--lib-name INTERFACE SIMULATOR
Print the name of interface library for given interface (VPI/VHPI/FLI) and simulator
--lib-name-path INTERFACE SIMULATOR
Print the absolute path of interface library for given interface (VPI/VHPI/FLI) and simulator
-v, --version echo the version of cocotb
[root@TTOOMM /home/root/ic_prjs/cocotb_test/cocotb/examples/simple_dff]$cocotb-config --lib-dir
/home/lib/python3.11/site-packages/cocotb/libs
[root@TTOOMM /home/root/ic_prjs/cocotb_test/cocotb/examples/simple_dff]$cocotb-config --libpython
[root@TTOOMM /home/root/ic_prjs/cocotb_test/cocotb/examples/simple_dff]$

I can't find the libpython of cocotb....., I will get a error

/home/lib/python3.11/site-packages/cocotb/share/makefiles/Makefile.inc:159: ***

find_libpython was not able to find a libpython in the current Python environment. Ensure
the Python development packages are installed. If they are installed and find_libpython
is not finding the path to libpython, file an upstream bug in find_libpython; then
manually override the LIBPYTHON_LOC make variable with the absolute path to libpython.so
(or python.dll on Windows).

when i run the make SIM=icarus.

why ???

just the libpython can not be finded.

I find the libphthon3.so in the /usr/lib64/, but I dont konw how to config this path .

lrwxrwxrwx.   1 root root       29 11月 25 2020 libpyglib-2.0-python.so -> libpyglib-2.0-python.so.0.0.0
lrwxrwxrwx.   1 root root       29 11月 25 2020 libpyglib-2.0-python.so.0 -> libpyglib-2.0-python.so.0.0.0
-rw-r--r--.   1 root root    19600 6月  10 2014 libpyglib-2.0-python.so.0.0.0
lrwxrwxrwx.   1 root root       19 8月  28 17:29 libpython2.7.so -> libpython2.7.so.1.0
-rwxr-xr-x.   1 root root  1847760 6月  20 19:37 libpython2.7.so.1.0
lrwxrwxrwx.   1 root root       20 5月   8 2022 libpython3.6m.so -> libpython3.6m.so.1.0
-rwxr-xr-x.   1 root root  3144192 11月 17 2020 libpython3.6m.so.1.0
-rwxr-xr-x.   1 root root     6712 11月 17 2020 libpython3.so
drwxr-xr-x.  26 root root    20480 8月  28 17:29 python2.7
drwxr-xr-x.  32 root root     8192 2月   7 2022 python3.6
[root@TTOOMM /usr/lib64]#
toolic
  • 57,801
  • 17
  • 75
  • 117
  • Did you try specifying `LIBPYTHON_LOC`, and the message suggested? And why on earth are you running as root? That's a bad practice. – Tim Roberts Aug 30 '23 at 02:55
  • `cocotb` is installed in `/home/lib/python3.11` (which is an odd location), but you only have binaries for Python 2.7 and 3.6. Did you actually install Python 3.11? – Tim Roberts Aug 30 '23 at 03:05
  • Thanks for your advice, this is a local centos,so I dont notice that I was in the root . As for python3.11,I am sure that i installed the 3.11 version, and I tried to link the libpython to the cocotb lib. As a result, thank you. – OldTomLoveCode Aug 30 '23 at 03:21

0 Answers0