Hi,
how did you install ROOT exactly? Can you remove all ROOT installations from your system, including from the base conda environment (conda uninstall root should suffice), then try the steps described here?
Just to add on what @eguiraud already said, the error you reported happens because you are trying to use ROOT from Python3 but it was build for Python2.
as suggested. It said that it would add root, root-binaries… to my anaconda environment and downloaded and installed a bunch of packages. The process was successful.
But I still get the same error message when trying to run my scripts.
Did you conda activate the environment before installing ROOT? I.e. are you sure that you are using the conda installation and not the same broken installation of your first post? For example, what does which root say?
@eguiraud Hi, maybe you could help me one more time.
I can’t run scripts which contain pyroot commands from my shell. I always get the error message
Traceback (most recent call last):
File "test.py", line 15, in <module>
import ROOT
File "/Applications/root_v5.34.38/lib/ROOT.py", line 103, in <module>
import libPyROOT as _root
ImportError: dynamic module does not define module export function (PyInit_libPyROOT)
root 5.34 is an old Version I got installed. I don’t know what this implies. When I run
which root
I get
/Users/.../opt/anaconda3/bin/root
So to my understanding this should be fine.
When I build my scripts within my Text editor Sublime with a configured conda build system everything works just finde. I don’t get it.
Hi @Jailbone,
uhm looks like python is looking up the 5.34 installation first when searching for the ROOT module to import. Probably the 5.34 installation is setting some environment variables such as PYTHONPATH?
Make sure that which python also points to the anaconda3 python installation and that PYTHONPATH, PATH, LD_LIBRARY_PATH do not mention the 5.34 installation.