Create Object detection code environment failed after I upgraded DSS to V11

marcochang1028
Level 3
Create Object detection code environment failed after I upgraded DSS to V11

After I upgraded DSS to V11, I want to try new function of Object detection.

I encountered a error when I created a code environment as follow:

Traceback (most recent call last):  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main    "__main__", mod_spec)  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code    exec(code, run_globals)  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/__main__.py", line 168, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/__main__.py", line 162, in run  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/__init__.py", line 3, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/run/__init__.py", line 14, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/run/plugin/creators.py", line 6, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/create/via_global_ref/builtin/builtin_way.py", line 7, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/create/creator.py", line 15, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/discovery/cached_py_info.py", line 16, in <module>  File "/opt/dataiku-dss-11.0.1/scripts/virtualenv.pyz/virtualenv/discovery/py_info.py", line 16, in <module>ImportError: cannot import name 'dist' from 'distutils' (/usr/lib/python3.7/distutils/__init__.py)

 

0 Kudos
14 Replies
Turribeach

What did you use to install Dataiku v11? Did you run the upgrade script after installing Dataiku v11?

0 Kudos
marcochang1028
Level 3
Author

Sorry for the late response, I am still waiting for the answer from our system admin.

I will get back to you as soon as I get the answer.

0 Kudos
Bill_Hsu
Level 1

We upgrade system to V11.0.1 from v10.0.5

Just follow the instruction on https://doc.dataiku.com/dss/latest/installation/custom/upgrade.html

dataiku-dss-NEWVERSION/installer.sh -d DATA_DIR -u
DATA_DIR/bin/dssadmin install-R-integration

Reinstall graphics exports

DATA_DIR/bin/dss start

 

0 Kudos
GregW
Dataiker

Hi, how did you create the code environment - did you follow the instructions here? https://doc.dataiku.com/dss/latest/machine-learning/computer-vision/first-model.html#install-the-req...

Thanks,

Greg

marcochang1028
Level 3
Author

Actually, I found that this error occurred even when I was simply creating a new code environment in the Administration --> Code Env.s page.

0 Kudos
marcochang1028
Level 3
Author

Hi all,

I tried the things as following:

1. reinstall Python3.6 to Python3.9

2. reinstall python3.6-distutils to python3.9-distutils

3. copy all files in the folder of python3.9-distutils to the folder of python3.6-distutils.

4. restart Dataiku service.

Now I can successfully create the code env of python3.8 and python3.9, but still cannot create code env of python3.6 and python3.7. The error I encountered is as attached image:

 

Any suggestion?

On what OS is Dataiku installed?

0 Kudos
Bill_Hsu
Level 1

Ubuntu 20.04.4

0 Kudos
GregW
Dataiker

Hi, indeed this does not seem to be related to the Object Detection feature, but rather an issue with your underlying Python installation/configuration, so I would recommend opening a support track to help diagnose that further.

Thanks, 

Greg

0 Kudos
ishtiyaq
Level 1

I am also getting the same error.

0 Kudos
marcochang1028
Level 3
Author

Sorry to hear that you are encountering the same problem.

Actually I did a lot to fix that, therefore I don't know exactly which action or actions were really work.

But the last two steps I did to fix it were as follows for your reference.

1. cleaning up the virtualenv cache dir in the DSS host by executing

rm -rf /home/dataiku/.local/share/virtualenv/*

2. install the python3.6-dev package
Hope these can help.
Good luck.
0 Kudos
sergeyd
Dataiker

@ishtiyaq We have previously seen such an error on the DSS installations on WSL.

Are you running Ubuntu on WSL?

0 Kudos
ishtiyaq
Level 1

No, I am using ubuntu on an Amazon EC2 instance.

0 Kudos
sergeyd
Dataiker

Ok, thanks for confirmation.

In that case, we are left with two points that cause this:

  • clean up virtualenv cache directory ~/.local/share/virtualenv/ # ~ is home dir of DSS system user
  • install python3.6-dev package (if not already done)
  • for Python3.7 env should be python3.7-dev package
0 Kudos