Error when creating a code envieroment with Python 3.6

Solved!
rafael_rosado97
Level 4
Error when creating a code envieroment with Python 3.6

Hello, everyone.

 

I am trying to create a code enviroment with python 3.6 and I got the following error: 

 

RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.6'

 

Same error when I try with 3.7, 3.8 or 3.9; but with 2.7, there is not any error.

 

Do you know why it occurs?

Thanks!!

 

 

Operating system used: Linux

0 Kudos
2 Solutions
MiguelangelC
Dataiker

Hi,


The error indicates that Python 3.6 is not installed in your system or DSS cannot find it because it's not in the PATH. Likely the same reason is why this also happens when creating a code-env using versions 3.7, 3.8 or 3.9, whereas it looks like you have python 2.7 installed in your host.


You can doublecheck by running the following command:

$ which python3.6

If this command fails, you would need to first install Python 3.6 and make sure to add it to the PATH environment variable.

View solution in original post

DanDy
Dataiker
4 Replies
MiguelangelC
Dataiker

Hi,


The error indicates that Python 3.6 is not installed in your system or DSS cannot find it because it's not in the PATH. Likely the same reason is why this also happens when creating a code-env using versions 3.7, 3.8 or 3.9, whereas it looks like you have python 2.7 installed in your host.


You can doublecheck by running the following command:

$ which python3.6

If this command fails, you would need to first install Python 3.6 and make sure to add it to the PATH environment variable.

DanDy
Dataiker

Check this solution https://community.dataiku.com/t5/Setup-Configuration/Could-not-create-python-env-after-upgrading-to-...

You need to have python 3.6 installed and PATH specified.

rafael_rosado97
Level 4
Author

Thank you so much, @MiguelangelC and @DanDy . It was very helpful and worked for me.

For those who want to add different Python version and had the same error, to define PATH on env-site.sh, it works for me: 

export PATH=$PATHโ€‹/usr/local/bin/python3.7:$PATHโ€‹/usr/local/bin/python3.8:$PATHโ€‹/usr/local/bin/python3.9

โ€‹/usr/local/bin/pythonVERSION was returned by the command: which pythonVERSION

 

0 Kudos
rafael_rosado97
Level 4
Author

Thank you very much, @MiguelangelC and @DanDy . It works!

0 Kudos