VM and Python version

tNbre Registered Posts: 10 ✭✭✭✭


I'm currently working on a 10.0.3 DSS VM and i realized that my VM have a build-in version of python set to 2.7.

Working on an offline computer i can't setup Code env to use python 3.7.

Is there a way to have the build in DSS python set to 3.7 directly?

Is the new version the dss VM (10.0.7) have python 3.7 set as a default python env?





  • Sarina
    Sarina Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 315 Dataiker

    Hi @tNbre

    Indeed, starting in DSS 9 you can use Python 3.7 for code environments. If you upgrade to 10.0.4, you can also use Python 3.7, 3.8, 3.9 and 3.10 for any code environments as well.

    If you just want to switch over your default code environment to Python 3.7, you can:
    (1) Ensure that Python 3.7 is installed on your VM. If you newly installed it, you'll need to restart DSS so that Python 3.7 can be found in the PATH for DSS.
    (2) Create a new code environment using Python 3.7
    (3) Under Administration > Mics. > Code envs > update your code environment to the
    new Python 3.7 default code environment.

    This will change the default code env for any new recipes. You can also update existing recipes through the Python API, which I'm happy to provide some sample code for. However, you'd want to test out recipes using the new code environment first, to ensure that existing Python 2.7 code does not fail on 3.7, so this may be easier to do manually.

    I also wanted to check if you are referring to your default code environment or your builtin code environment. Switching over your builtin code environment is a little more complicated, because you'll want to validate that all code in DSS that uses the builtin code environment can run successfully on Python 3.7. Because of this, it's generally safer to switch over code more gradually to a new code environment, so that you can easily test code on the new code environment and simply switch individual recipes back to the original code environment if modifications to the code are needed in order to update the code to a higher Python version. You can also create a backup Python 2.7 code environment so that you can switch any code back to Python 2.7 if needed.

    If you are referring to updating the builtin Python environment, after installing Python 3.7 on your VM, you can update to Python 3.7 using the upgrade mode (-u flag) and setting the builtin Python environment (-P flag) like so:

    /PATH/TO/dataiku-dss-VERSION/installer.sh -d DATA_DIR -P /usr/local/bin/python3.7 -u

    This will then automatically set all recipes that use the builtin environment to use Python 3.7, so you'll want to be cognizant of the points above. Let me know if you have any questions and what your setup is if so!


  • tNbre
    tNbre Registered Posts: 10 ✭✭✭✭

    Hi @SarinaS

    Thanks for your reply. My issue is that i need to update the python version on an offline computer (security).

    I figure out that i can acctualy create a python env with python 3.7 on an other VM and then export it to be loaded on my offline computer.

    I will try this solution first before trying your solution. As my need is actualy to work on a python 3.7 or newer environment i think this should work.

Setup Info
      Help me…