Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

Python code environment - Custom

Solved!
rona
Level 3
Python code environment - Custom

Hello,

Please, could you explain the use of Python code environment with the option 'Custom (lookup in PATH)' ?

- In which context to use it ?
- How to do the setup ? which information is expected for 'Python executable' field ?

thanks

Annie

1 Solution
Alex_Combessie
Dataiker Alumni

Hi,

[TL;DR]  The "Custom (lookup in PATH)" option is meant for very specific use cases when the normal mechanisms (Python X.x from PATH) don't work. It is rarely needed and we recommend using the normal mechanisms as much as possible.

Do not forget to install the corresponding Python version on the server, as DSS will not do that for you.

[More details]

There are a few options on this screen:

Screenshot 2020-04-21 at 12.15.59.png

The normal mechanisms expect the python executables to be in the PATH variable. To be more precise, the exact syntax we expect is "python2.7", "python3.5" or "python3.6". You can test it easily if you have server access by typing "python2.7" in your shell.

The "Custom (lookup in PATH)" option will require you to provide a full path to a Python executable or an alias which points to it. This can introduce some risks when you work across several DSS nodes, as the paths may differ.  When moving from Design to Automation or API nodes, DSS needs to be able to rebuild the code-env.

Finally, you will need to be very careful to use only supported Python versions. As of today, this does not include Python 3.7, which are currently qualifying.

Hope it helps,

Alex

View solution in original post

7 Replies
Alex_Combessie
Dataiker Alumni

Hi,

[TL;DR]  The "Custom (lookup in PATH)" option is meant for very specific use cases when the normal mechanisms (Python X.x from PATH) don't work. It is rarely needed and we recommend using the normal mechanisms as much as possible.

Do not forget to install the corresponding Python version on the server, as DSS will not do that for you.

[More details]

There are a few options on this screen:

Screenshot 2020-04-21 at 12.15.59.png

The normal mechanisms expect the python executables to be in the PATH variable. To be more precise, the exact syntax we expect is "python2.7", "python3.5" or "python3.6". You can test it easily if you have server access by typing "python2.7" in your shell.

The "Custom (lookup in PATH)" option will require you to provide a full path to a Python executable or an alias which points to it. This can introduce some risks when you work across several DSS nodes, as the paths may differ.  When moving from Design to Automation or API nodes, DSS needs to be able to rebuild the code-env.

Finally, you will need to be very careful to use only supported Python versions. As of today, this does not include Python 3.7, which are currently qualifying.

Hope it helps,

Alex

View solution in original post

Hi @Alex_Combessie ,

could you please tell me how can I install a different version of Python in DSS?

Thanks.

 

0 Kudos
MRvLuijpen
Neuron
Neuron

Hello @Alex_Combessie . 

I have a follow-up question about the python versions:

1) We don't have python 3.7 installed, but Python 3.8. Is it possible/easy to remove the Python3.7 from the list and have the python 3.8 added to the list instead?

 

Thanks for your response.

Marc Robert

0 Kudos
Alex_Combessie
Dataiker Alumni

Hi @MRvLuijpen 

As of today (DSS 9), python 3.8 is not supported by DSS.

Cheers,

Alex

MRvLuijpen
Neuron
Neuron

Hi @Alex_Combessie. Thanks for the reply. 

Is it possible to remove the option for Python3.5 entry in the dropdown box?

Alex_Combessie
Dataiker Alumni

Hi @MRvLuijpen 

It is not possible to remove this entry in the UI, as Python 3.5 is one of the versions officially supported by DSS. 

Cheers,

Alex

MRvLuijpen
Neuron
Neuron

Thank you @Alex_Combessie for your reply.

Cheers,

Marc Robert

A banner prompting to get Dataiku DSS