PyROOT with Python 3.7

I built root with python 3.7.3 (from anaconda) on mac OSX. I configure with this command:
CMAKE_INVOKE:STRING=/Applications/CMake.app/Contents/bin/cmake
-DPYTHON_EXECUTABLE="/Applications/anaconda3/bin/python" -Dpython3=“ON” /Applications/root-6.16.00

Is this a known issue?


ROOT Version: 6.16/00
Platform: OSX 10.13.6
Compiler: Apple LLVM version 10.0.0 (clang-1000.11.45.5)


The build seems ok, however when importing ROOT I get the following error:
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)

[<unknown binary>] (no debug info)

[/Applications/anaconda3/lib/libpython3.7m.dylib] PyUnicode_InternFromString (no debug info)

[/Applications/root-6.16.00/build/lib/libPyROOT.so] PyROOT::CreatePyStrings() /Applications/root-6.16.00/bindings/pyroot/src/PyStrings.cxx:64

[/Applications/root-6.16.00/build/lib/libPyROOT.so] PyInit_libPyROOT /Applications/root-6.16.00/bindings/pyroot/src/RootModule.cxx:848

[/Applications/anaconda3/bin/python] _PyImport_LoadDynamicModuleWithSpec (no debug info)

[/Applications/anaconda3/bin/python] _imp_create_dynamic (no debug info)

[/Applications/anaconda3/bin/python] _PyMethodDef_RawFastCallDict (no debug info)

[/Applications/anaconda3/bin/python] PyCFunction_Call (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] _PyFunction_FastCallKeywords (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] object_vacall (no debug info)

[/Applications/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)

[/Applications/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] builtin_exec (no debug info)

[/Applications/anaconda3/bin/python] _PyMethodDef_RawFastCallDict (no debug info)

[/Applications/anaconda3/bin/python] PyCFunction_Call (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] _PyFunction_FastCallKeywords (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] object_vacall (no debug info)

[/Applications/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)

[/Applications/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] builtin_exec (no debug info)

[/Applications/anaconda3/bin/python] _PyMethodDef_RawFastCallDict (no debug info)

[/Applications/anaconda3/bin/python] PyCFunction_Call (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] _PyFunction_FastCallKeywords (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] call_function (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] function_code_fastcall (no debug info)

[/Applications/anaconda3/bin/python] object_vacall (no debug info)

[/Applications/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)

[/Applications/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)

[/Applications/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)

[/Applications/anaconda3/bin/python] PyRun_InteractiveOneObjectEx (no debug info)

[/Applications/anaconda3/bin/python] PyRun_InteractiveLoopFlags (no debug info)

[/Applications/anaconda3/bin/python] PyRun_AnyFileExFlags (no debug info)

[/Applications/anaconda3/bin/python] pymain_main (no debug info)

[/Applications/anaconda3/bin/python] main (no debug info)

[/usr/lib/system/libdyld.dylib] start (no debug info)

[<unknown binary>] (no debug info)

Hi,

If you build ROOT yourself and want to use Anaconda, you need to make sure you used Anaconda’s compiler to build ROOT, otherwise you can run into problems.

Alternatively (and much easier), you can now install ROOT with Conda (more precisely 6.16, whis is the ROOT version you are using). You need to run:

conda create --name myenv --channel conda-forge python=3 root

Hello,

thanks for the reply. After I posted this, I found this described in an old ticket:
https://sft.its.cern.ch/jira/browse/ROOT-9145?focusedCommentId=83850&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-83850

However, I had issues installing conda’s gcc (I guess this is what is needed) so I reverted back to Python 2.7.

May be I will try out the conda recipe on a linux system.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.