Trouble creating custom Python code environments

Marty
Marty Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 9 Partner

I am trying to create a new Python Code Env in my locally installed instance of Dataiku. The only non-conda based option is Python 3.7. All the other options (Python 3.5, 3.6, 3.8, 3.9, 3.10, 3.11) are listed as "Not available" in the dropdown. I have Python 3.10.11 locally installed, but somehow Dataiku is not recognizing it. Any idea how I can create a Code Env with a more recent version of Python (Python 3.10)?


Operating system used: Windows

Answers

  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker

    To create a code env with python 3.10, you need to install this python version on the DSS server host.

    Once this version is installed, you need to make sure that the python version is in the path of DSS user. For this, you need to update the DATA_DIR/bin/env-site.sh file by adding the following line:

    export PATH=$PATH:path/to/desired_python


    Then restart DSS to pick up the change made in DATADIR/bin/env-site.sh.

    Once DSS is restarted, you should be able to create code environments using python 3.10.

  • Marty
    Marty Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 9 Partner
    edited July 17

    Hi CatalinaS,

    Thanks for the suggestion.

    I found the env-site.sh file here:

    C:\Users\MYNAME\AppData\Local\Dataiku\DataScienceStudio\dss_home\bin

    I edited it based on your suggestion:

    # This file is sourced last by DSS startup scripts
    # You can add local customizations to it
    
    export PATH=$PATH:"C:\Users\MYNAME\AppData\Local\Programs\Python\Python310\python.exe"

    Unfortunately, nothing changed. I still only have access to Python 3.7, and not Python 3.10. Did I mess something up? Any other thoughts?

    Thanks!

    -Marty

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,024 Neuron

    The path should point to the directory where the EXE is, not to the EXE itself. Also env-site.sh is for Linux systems. On Windows you need do it in a different place:

    https://www.computerhope.com/issues/ch000549.htm

    Once you do this restart you machine. Then open a CMD prompt and type "python" and verify that it loads python v3.10.

Setup Info
    Tags
      Help me…