ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Question about python scripts
Date Tue, 29 Nov 2016 22:33:40 GMT
Hi Alejandro,

Sorry for the delay. I looked at that script and it didn’t seem like it
would allow for me to force the right python. What I need is something
like where the scripts get generated, I just need to change the top line
of the scripts below, but since they’re regenerated when services are
stopped, I need to do it programmatically. Maybe this could be made as a
property, which is optionally configurable?




On 11/18/16, 6:44 PM, "Alejandro Fernandez" <>

>Hi Ian,
>Ambari currently supports Python 2.6 and 2.7.
>Take a look at 
>l/conf/unix/ambari-shell to see if you can force it to always use Python
>On 11/17/16, 2:22 PM, ""
><> wrote:
>>I¹m currently running into an issue, where some of the Ambari related
>>python scripts are being invoked from a python 3 environment:
>>The reason this happens is a bit complicated, I¹m running jupyterhub,
>>which requires a python 3 environment on my management node, where ambari
>>is located. Ambari uses python 2 currently. For most kernels, it works
>>fine, but Apache Toree, is for some reason calling those scripts from
>>within the python 3 environment. Since the scripts use /usr/bin/env
>>python, when they are in the conda environment for jupyterhub, they use
>>python 3 and break. So, what I have done is update the scripts to be
>>usable in both python 2 and 3. Unfortunately, it appears these scripts
>>are recreated when the cluster goes down (or is built), so I¹d have to
>>swap the files out.
>>What I¹m proposing is that my changes for the scripts (or someone
>>else¹s), get committed, so with future versions of Ambari, there are not
>>issues of cross compatibility.
>>How does this sound?

View raw message