Opened 10 years ago
Closed 9 years ago
#45873 closed defect (fixed)
root5: ImportError about __builtin__ on Python 3
Reported by: | cdeil (Christoph Deil) | Owned by: | cjones051073 (Chris Jones) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mattiafrancescomoro@… | |
Port: | root5 |
Description
I installed root5 +python34 on Mac OS X 10.10. Trying to import ROOT in Python gives this error:
$ python -c 'import ROOT' Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ROOT.py", line 341, in <module> import __builtin__ ImportError: No module named '__builtin__'
Is this a ROOT bug or a problem with how it's configured in Macports?
Change History (8)
comment:1 Changed 10 years ago by larryv (Lawrence Velázquez)
Cc: | jonesc@… removed |
---|---|
Owner: | changed from macports-tickets@… to jonesc@… |
comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)
comment:3 Changed 10 years ago by cdeil (Christoph Deil)
So it's a Python 3 bug in ROOT.py
and should be reported to the ROOT devs?
Can someone reproduce this issue inside or outside Macports?
Here's the ROOT.py
that was installed by Macports on my system: https://gist.github.com/cdeil/93a9234c2556478d674a#file-root-py-L328
comment:4 Changed 10 years ago by cjones051073 (Chris Jones)
Python 3 is not really supported by upstream, I know this from previous discussions. It compiles, but I can reproduce what you see. Please do report upstream, although I am not sure what response you will get..
Chris
comment:5 Changed 10 years ago by cdeil (Christoph Deil)
I filed an issue in the ROOT tracker: https://sft.its.cern.ch/jira/browse/ROOT-6898
Python 3 and ROOT has worked for me in the past years, so either it's a recent regression or a configuration problem.
comment:6 Changed 9 years ago by mojca (Mojca Miklavec)
The upstream ticket seems to suggest that the issue was fixed. Is that true?
Can we also add support for python3.5 to both root5
and root6
?
comment:7 Changed 9 years ago by cjones051073 (Chris Jones)
I *think* I tried python 3.5 a while back and it did not work, but perhaps things have changed since....
By all means add it as an option, its just another number in a list ;)
comment:8 Changed 9 years ago by mojca (Mojca Miklavec)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I added the python35
variant to root5
in r143654 and import ROOT
seems to work inside python3.5, I didn't do any more extensive tests (I'm not sure how to do them), so I'm considering this particular issue resolved.
It would be nice to add that variant to root6
as well, but Python3 is broken there at the moment anyway (#50066), so testing is not really possible.
I'm closing this ticket.
There is no
__builtin__
module in Python 3.4; you probably wantbuiltins
.