# PyCintex in ROOT 6

**URL:** <https://root-forum.cern.ch/t/pycintex-in-root-6/18986>\
**Category:** ROOT\
**Created:** [March 18, 2015, 12:49pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986 "2015-03-18T12:49:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiso](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wiso/32/11120_2.png) [@wiso](https://root-forum.cern.ch/u/wiso)\
**Post date:** [March 18, 2015, 12:49pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/1 "2015-03-18T12:49:07Z")

</div>

Hello, I guess there is a problem in PyCintex

```auto
source root-v6-02-05/bin/thisroot.sh

python
>>> import ROOT
>>> ROOT.gROOT.GetVersion()
'6.02/05'
>>> import PyCintex
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/turra/root-v6-02-05/lib/ROOT.py", line 353, in _importhook
    return _orig_ihook( name, glbls, lcls, fromlist, level )
  File "/usr/lib64/python2.7/site-packages/PyCintex.py", line 29, in <module>
    libPyROOT.MakeRootClass( 'PyROOT::TPyROOTApplication' ).InitCINTMessageCallback()
AttributeError: type object 'PyROOT::TPyROOTApplication' has no attribute 'InitCINTMessageCallback'
```

as far as I see the method InitCINTMessageCallback does not exist anymore.

---

<div class="post-metadata">

**Author:** ![wlav](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/f07891/32.png) [@wlav](https://root-forum.cern.ch/u/wlav)\
**Post date:** [March 18, 2015, 3:35pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/2 "2015-03-18T15:35:21Z")

</div>

Hi,

PyCintex no longer exists in ROOT6, so there must be a mix-up of environments there. (Cintex, i.e. Reflex to CINT mapping is itself gone, as both CINT and Reflex are gone.) Since about ROOT5.34/11 there is a module ‘[cppyy.py](http://cppyy.py)’, which also exists in compatible form in ROOT6 (same api, but of course no longer on Cintex).

If the origin of cppyy interests you, the name is from here: [http://doc.pypy.org/en/latest/cppyy.html](http://doc.pypy.org/en/latest/cppyy.html) and is intented to be compatible.

Cheers,  
Wim

---

<div class="post-metadata">

**Author:** ![wiso](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wiso/32/11120_2.png) [@wiso](https://root-forum.cern.ch/u/wiso)\
**Post date:** [March 18, 2015, 5:22pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/3 "2015-03-18T17:22:57Z")

</div>

thak you, you are right PyCintex is coming from /usr/lib64/python2.7/site-packages/PyCintex.py from a ROOT5 installation.

It should be nice to be able to use ROOT 5 (installed as fedora package) and 6 (manually setup with [thisroot.sh](http://thisroot.sh)) on the same machine.

Here the full Traceback

```auto
/home/turra/root-v6-02-05/lib/ROOT.pyc in _importhook(name, glbls, lcls, fromlist, level)
    351 pass
    352 if 5 <= sys.version_info[1]: # minor
--> 353 return _orig_ihook( name, glbls, lcls, fromlist, level )
    354 return _orig_ihook( name, glbls, lcls, fromlist )
    355 

/usr/lib64/python2.7/site-packages/PyCintex.py in <module>()
     27 
     28 libPyROOT.SetMemoryPolicy( libPyROOT.kMemoryStrict )
---> 29 libPyROOT.MakeRootClass( 'PyROOT::TPyROOTApplication' ).InitCINTMessageCallback()
     30 #--- Enable Autoloading ignoring possible error for the time being
     31 try: libPyROOT.gInterpreter.EnableAutoLoading()
```

is line 532 correct? Or do you mean \>= ?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 18, 2015, 5:33pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/4 "2015-03-18T17:33:26Z")

</div>

[[root.cern.ch/phpBB3/viewtopic.p](http://root.cern.ch/phpBB3/viewtopic.p) … 931#p76931]([Missing Canvas](https://root-forum.cern.ch/t/missing-canvas/17664/17)

---

<div class="post-metadata">

**Author:** ![wlav](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/f07891/32.png) [@wlav](https://root-forum.cern.ch/u/wlav)\
**Post date:** [March 18, 2015, 6:05pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/5 "2015-03-18T18:05:21Z")

</div>

@wiso: sorry, not following … the import hook is called b/c of the ‘import’ statement. Nothing to do with anything else. Beyond that:[quote=“wiso”]is line 532 correct? Or do you mean \>= ?[/quote]which line exactly? My guess is that ‘352’ was meant? If that’s the case, then yes, that code is correct.

(Just to be sure, that ‘5’ in there has nothing to do with ROOT5. Is to do with the ‘5’ in python2.5.)

Cheers,  
Wim

---

<div class="post-metadata">

**Author:** ![wiso](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wiso/32/11120_2.png) [@wiso](https://root-forum.cern.ch/u/wiso)\
**Post date:** [March 18, 2015, 6:19pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/6 "2015-03-18T18:19:26Z")

</div>

[quote=“wlav”]@wiso: sorry, not following … the import hook is called b/c of the ‘import’ statement. Nothing to do with anything else. Beyond that:[quote=“wiso”]is line 532 correct? Or do you mean \>= ?[/quote]which line exactly? My guess is that ‘352’ was meant? If that’s the case, then yes, that code is correct.  
[/quote]  
Sorry, a typo.

[quote]  
(Just to be sure, that ‘5’ in there has nothing to do with ROOT5. Is to do with the ‘5’ in python2.5.)

Cheers,  
Wim[/quote]

ok.

The point is: why if I setup ROOT6, it tried to import PyCintex from my installation of ROOT 5?

---

<div class="post-metadata">

**Author:** ![wlav](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/f07891/32.png) [@wlav](https://root-forum.cern.ch/u/wlav)\
**Post date:** [March 18, 2015, 6:31pm UTC](https://root-forum.cern.ch/t/pycintex-in-root-6/18986/7 "2015-03-18T18:31:48Z")

</div>

[quote=“wiso”]The point is: why if I setup ROOT6, it tried to import PyCintex from my installation of ROOT 5?[/quote]There is no PyCintex python module in ROOT6, so python will follow the usual places beyond that to find it, and since you have one in a standard system location, that is found.

Compare this to [ROOT.py](http://ROOT.py), which is picked up from ROOT6, b/c there is one, and so that one masks the one in the system location, which is never seen.

Cheers,  
Wim
