| Summary: | dev-util/nvidia-cuda-toolkit-11.5.0-r1: warning: PyMemoryView_FromObject: called while Python is not available! / Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | David <bugsgentoo> |
| Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jstein, lowsfer |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| See Also: | https://github.com/gentoo/gentoo/pull/23425 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | emerge --info output | ||
cuda-gdb works for me in CUDA 10.2, but not on any CUDA 11+ in the tree. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b43ff6fe5595ba4d930df5f358996a95f204425 commit 4b43ff6fe5595ba4d930df5f358996a95f204425 Author: Guilherme Amadio <amadio@gentoo.org> AuthorDate: 2022-02-23 09:46:10 +0000 Commit: Guilherme Amadio <amadio@gentoo.org> CommitDate: 2022-02-23 09:47:57 +0000 dev-util/nvidia-cuda-toolkit: version bump to 11.6.1 Closes: https://bugs.gentoo.org/823882 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Guilherme Amadio <amadio@gentoo.org> dev-util/nvidia-cuda-toolkit/Manifest | 1 + .../nvidia-cuda-toolkit-11.6.1.ebuild | 271 +++++++++++++++++++++ 2 files changed, 272 insertions(+) |
Created attachment 751354 [details] emerge --info output In my current setup with nvidia-cuda-toolkit 11.5.0-r1 and python 3.9.8 (compiled with GCC 11.2), cuda-gdb fails with the following error message: cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = 'python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/usr/bin/python3' sys.base_prefix = '/usr' sys.base_exec_prefix = '/usr' sys.platlibdir = 'lib' sys.executable = '/usr/bin/python3' sys.prefix = '/usr' sys.exec_prefix = '/usr' sys.path = [ '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1007, in _find_and_load cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! File "<frozen importlib._bootstrap>", line 680, in _load_unlocked cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! File "<frozen importlib._bootstrap_external>", line 846, in exec_module cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! File "<frozen importlib._bootstrap_external>", line 951, in get_code cuda-gdb: warning: PyMemoryView_FromObject: called while Python is not available! SystemError: <class 'memoryview'> returned NULL without setting an error Searching online, I found that "init_fs_encoding: failed to get the Python codec of the filesystem encoding" is often a hint that something is not correct with the python environment, which makes me believe "PyMemoryView_FromObject: called while Python is not available!" is the actual error. But I could not find anything about this warning message at all. Unfortunately I cannot tell exactly when it started to fail since I don't remember when I used cuda-gdb successfully last time. I certainly used it with a cuda 11.x release before, but meanwhile I did several distribution updates. I tried to downgrade CUDA to 11.4, but that yields the same error. Downgrading the whole distribution to what it was before is unfortunately not an option.