Could not create python env after upgrading to Dataiku v11.2.1

Zhengxin
Zhengxin Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 9 Partner

Hi Dataiku Experts,

We upgraded our Dataiku instance from v10 to v11.2.1, However it could not create python env higher than Python 3.6.

The error shows below, for example trying to create a new python 3.9 env.

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/__main__.py", line 167, in <module>
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/__main__.py", line 163, in run
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/virtualenv/__main__.py", line 18, in run
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/virtualenv/run/__init__.py", line 30, in cli_run
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/virtualenv/run/__init__.py", line 48, in session_via_cli
  File "/home/dataiku/dataiku-dss-11.2.1/scripts/virtualenv.pyz/virtualenv/run/__init__.py", line 72, in build_parser
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.9'

How to resolve it? Any help is much appreciated

Best Answer

  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker
    edited July 17 Answer ✓

    Hi @Joshuazzx
    ,

    The error "RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.9'" indicates that python 3.9 is not installed or is not available in the PATH of the DSS user.

    You could check this by running the following commands as the DSS user:

    python3 --version
    which python3.9

    The output of these commands will show if Python 3.9 is installed on your machine.

    If it's not already installed, you will need to install it or contact your system administrator to have it installed. The instructions to install it are dependent on the OS. For example you can find the steps to install it on Centos here.

    After installing Python 3.9 on your machine, you should make sure that this Python version is in the path of your DSS user. For this, you should update the DATA_DIR/bin/env-site.sh PATH by adding the following line:

    export PATH=$PATH:​path/to/your/python/3.9

    And then restarting DSS.

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,981 Neuron

    Creating Python code environments in different Python versions requires that you install the corresponding Python version in your Linux machine as an “alternative” Python installation. Did you install Python 3.9 in your server? If so, can you please give the exact steps you used to install it? Thanks

  • Zhengxin
    Zhengxin Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 9 Partner

    Hi @Turribeach
    ,

    Thank you for your quick response.

    No, I do not think we have installed corresponding python versions on the machine. The Dataiku 11 is running on the same VM of Azure which we run Dataiku 10.

    Is there a guide or instruction on how to configure it properly?

    Thanks a lot!

Setup Info
    Tags
      Help me…