After invoking Python in the terminal, I use to digit ’ help() ’ and then ’ modules '. Basically it runs, but on these last days it won’t print any modules. It raises an error, printing on screen a long series of numpy deprecated stuff, numba debug, llvmlite.llvmpy deprecated…
Finally, there is the following:
This caffe2 python run failed to load cuda module:/usr/lib/python3.10/site-packages/caffe2/python/caffe2_pybind11_state_gpu.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZTIN6caffe212OperatorBaseE,and AMD hip module:No module named 'caffe2.python.caffe2_pybind11_state_hip'.Will run in CPU only mode.
Cannot load caffe2.python. Error: /usr/lib/python3.10/site-packages/caffe2/python/caffe2_pybind11_state.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZTIN6caffe212OperatorBaseE
I tried to install caffe2 but…
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-4on5n48i/caffe2_be740238522c428f9d0b4e389e73ea50/setup.py", line 108, in <module>
from tools.setup_helpers.env import check_env_flag, check_negative_env_flag
ModuleNotFoundError: No module named 'tools'
[end of output]
Use python3 -m pip list to see if pip knows the module.
Check you OS package manager to see if it installed it.
If you tell us the OS we can suggest what commands to use.
I’ve almost solved the issue. I discovered that caffe2 is deprecated and now is part of pytorch. I don’t know why numba still works when I search for help() → modules. Anyway, now I can find the documentation about them invoking the command.
Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:43:54) [MSC v.1928 32 bit (In
tel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
python3 -m pip list
File “”, line 1
python3 -m pip list
^
SyntaxError: invalid syntax
Once again, you need to invoke python3 -m pip ... commands from
your system command prompt (a cmd.exe window), not from an IDE or
the REPL. It’s a windows/DOS command, not a Python statement.