Open skochinsky opened 5 years ago
Issue is still present in 2020.02
Issue is still present in 2021.05 It most likely affects all people who uses pybind11. https://github.com/pybind/pybind11/issues/1930 https://github.com/pybind/pybind11/issues/2369
Actual Behavior
calling Py_InitializeEx() from Anaconda's python37.dll causes abort() to be called and terminate the host program
Expected Behavior
Py_InitializeEx() should succeed in case of correctly installed Anaconda.
Steps to Reproduce
Note: the above is just the simplest way to reproduce the issue. Actual user (IDAPython) loads python37.dll indirectly in the host process (ida.exe) via python3.dll
Additional notes
This seems to be caused by recent changes due to https://github.com/ContinuumIO/anaconda-issues/issues/10236 which makes Anaconda to ignore its own PythonPath in registry (see below) . It works for the installed python.exe because it falls back to the default of
.\lib;.\DLLs
but breaks for an executable outside of the install directory.The value of
HKEY_CURRENT_USER\SOFTWARE\Python\ContinuumAnalytics\Anaconda37-64\PythonPath
isC:\Users\Igor\Anaconda3\Lib;C:\Users\Igor\Anaconda3\DLLs
and works nicely if enabled byCONDA_PY_ALLOW_REG_PATHS=1
.P.S. is Anaconda fork's cpython source code available anywhere? I had to spend considerable time debugging the binary (thanks for the PDB though!)
Anaconda or Miniconda version:
Anaconda3-2019.10-Windows-x86_64.exe
Operating System:
Microsoft Windows [Version 10.0.18999.1]
conda info
conda list --show-channel-urls