Setting up rootpy on CERN's lxplus

514 views
Skip to first unread message

Akshay Katre

unread,
Jan 5, 2015, 7:50:38 AM1/5/15
to rootpy...@googlegroups.com
Hi all,

I'm trying to set up rootpy on CERN's lxplus slc6 machine and I can't get it to work right. 

I need to run with python 2.7.3 and ROOT > 5.32; however, following  the instructions here: 

always sets up with python 2.6.6 - even if I setup python 2.7.3 beforehand. 

Has anyone else had similar experiences and can tell me how they solved it please? 

Thanks in advance, 

Cheers
Akshay

Scott Stevenson

unread,
Jan 7, 2015, 5:15:37 PM1/7/15
to rootpy-users
Hi Akshay,
How did you setup Python 2.7.3 and ROOT? Please post the commands you
ran and any output from them.

Scott
signature.asc

Akshay Katre

unread,
Jan 8, 2015, 8:56:05 AM1/8/15
to rootpy...@googlegroups.com, sc...@stevenson.io
Hi Scott, 

Thanks for your quick reply, 
To setup  on lxplus machines (slc6) I usually do only the following:

SetupATLAS
localSetupPython 2.7.3-x86_64-slc6-gcc47
localSetupROOT 5.34.19-x86_64-slc6-gcc47-opt
Then I simply try: 

[akatre@lxplus0084] 14:37 ~> python
Python 2.7.3 (default, Oct 25 2012, 12:19:07) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
import rootpy
>>> import rootpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    return _orig_ihook( name, glbls, lcls, fromlist, level )
ImportError: No module named rootpy

I also tried to use similar techniques as shown on the rootpy webpages: 
source my_env/bin/activate
setupATLAS
localSetupPython 2.7.3-x86_64-slc6-gcc47
localSetupROOT 5.34.19-x86_64-slc6-gcc47-opt

~/my_env/bin/python rootpy/setup.py install

(my_env)[akatre@lxplus0104] 14:52 ~> python
Python 2.6.6 (r266:84292, Jan 23 2014, 10:39:35) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

It loads with python 2.6 still.. !
I think I see the problem, i.e. ~/my_env/bin/python is probably a 2.6 version of python
but how do I change that? 

And ofcourse if you have any other suggestions on how to solve this would
also be great. 

Akshay

 
Scott

Scott Stevenson

unread,
Jan 8, 2015, 5:34:21 PM1/8/15
to rootpy-users
Hi Akshay,

On Thu, Jan 08, 2015 at 05:56:05AM -0800, Akshay Katre wrote:
> To setup on lxplus machines (slc6) I usually do only the following:
>
> SetupATLAS
> localSetupPython 2.7.3-x86_64-slc6-gcc47
> localSetupROOT 5.34.19-x86_64-slc6-gcc47-opt

Did you also run these commands before you installed rootpy? If not,
you might have installed with the system Python which is indeed 2.6.6 on
SLC6.

Modules are installed to a directory specific to the Python major
version, so if you installed rootpy using 2.6 you won't be able to
import it from 2.7.

You can see if this is the case by checking if
~/.local/lib/python2.6/site-packages contains a directory called
rootpy-dev-py2.6.egg, but there isn't a rootpy-dev-py2.7.egg directory
in ~/.local/lib/python2.7/site-packages (this is assuming you installed
with `python setup.py install --user`).

> I also tried to use similar techniques as shown on the rootpy webpages:
> source my_env/bin/activate
> setupATLAS
> localSetupPython 2.7.3-x86_64-slc6-gcc47
> localSetupROOT 5.34.19-x86_64-slc6-gcc47-opt
>
> ~/my_env/bin/python rootpy/setup.py install
>
> (my_env)[akatre@lxplus0104] 14:52 ~> python
> Python 2.6.6 (r266:84292, Jan 23 2014, 10:39:35)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
>
> It loads with python 2.6 still.. !
> I think I see the problem, i.e. ~/my_env/bin/python is probably a 2.6
> version of python
> but how do I change that?

It looks like the ATLAS scripts provide Python 2.7 but not virtualenv
with it, so you got the system virtualenv and hence Python 2.6.6 again.

Scott
signature.asc
Reply all
Reply to author
Forward
0 new messages