-
Notifications
You must be signed in to change notification settings - Fork 767
Description
I am trying to run a python program in multithreading mode with the free threading variant of python 3.13 (under linux) and it fails to initialise dotnet.
I tried with both mono and the microsoft version(s)
I get follwoing error for the mono version:
Traceback (most recent call last):
File "/python_path/lib/python3.13t/site-packages/pythonnet/init.py", line 75, in _create_runtime_from_spec
return clr_loader.get_mono(**params)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/python_path/lib/python3.13t/site-packages/clr_loader/init.py", line 73, in get_mono
libmono = find_libmono(sgen=sgen, assembly_dir=assembly_dir)
File "/python_path/lib/python3.13t/site-packages/clr_loader/util/find.py", line 149, in find_libmono
raise RuntimeError("Could not find libmono")
RuntimeError: Could not find libmono
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/python_path/lib/python3.13t/site-packages/fisher_py/net_wrapping/init.py", line 5, in
pythonnet.load() # Try default (i.e. 'mono' or PYTHONNET_RUNTIME)
~~~~~~~~~~~~~~^^
File "/python_path/lib/python3.13t/site-packages/pythonnet/init.py", line 133, in load
set_runtime_from_env()
~~~~~~~~~~~~~~~~~~~~^^
File "/python_path/lib/python3.13t/site-packages/pythonnet/init.py", line 114, in set_runtime_from_env
runtime = _create_runtime_from_spec(spec)
File "/python_path/lib/python3.13t/site-packages/pythonnet/init.py", line 82, in _create_runtime_from_spec
raise RuntimeError(
...<5 lines>...
) from exc
RuntimeError: Failed to create a default .NET runtime, which would
have been "mono" on this system. Either install a
compatible runtime or configure it explicitly via
set_runtime or the PYTHONNET_* environment variables
(see set_runtime_from_env).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/path_to_source/spectra_reader.py", line 699, in init
from fisher_py.raw_file_reader import RawFileReaderAdapter
File "/python_path/lib/python3.13t/site-packages/fisher_py/init.py", line 1, in
from fisher_py.raw_file import RawFile
File "/python_path/lib/python3.13t/site-packages/fisher_py/raw_file.py", line 2, in
from fisher_py.raw_file_reader import RawFileReaderAdapter
File "/python_path/lib/python3.13t/site-packages/fisher_py/raw_file_reader/init.py", line 1, in
from fisher_py.raw_file_reader.scan_dependents import ScanDependents
File "/python_path/lib/python3.13t/site-packages/fisher_py/raw_file_reader/scan_dependents.py", line 1, in
from fisher_py.net_wrapping import NetWrapperBase
File "/python_path/lib/python3.13t/site-packages/fisher_py/net_wrapping/init.py", line 7, in
pythonnet.load('coreclr') # Fallback on coreclr
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/python_path/lib/python3.13t/site-packages/pythonnet/init.py", line 146, in load
raise RuntimeError("Failed to initialize Python.Runtime.dll")
RuntimeError: Failed to initialize Python.Runtime.dll
/path_to_source/spectra_reader.py(706)init()