Python3 in Custom Plugin

Solved!
gblack686
Level 4
Python3 in Custom Plugin

I'm trying to use Python 3 within my plugin. My current environment is using Python36 as its Jupyter interpretor, but when I check the logs, it still looks like Python 2.7 is being inherited. 

'/mnt/dataiku/DATA_DIR/pyenv/lib/python27.zip'

Is there a way to change this for an individual plugin?  My main desire for Python 3 is using f-string formatting in my code. 

1 Solution
fchataigner2
Dataiker

you can specify a what python packages and versions the plugin wants by adding a code env definition in the plugin (see https://doc.dataiku.com/dss/latest/plugins/reference/other.html#code-environments) . You can adjust the python versions used by specifying them in acceptedPythonInterpreters

View solution in original post

1 Reply
fchataigner2
Dataiker

you can specify a what python packages and versions the plugin wants by adding a code env definition in the plugin (see https://doc.dataiku.com/dss/latest/plugins/reference/other.html#code-environments) . You can adjust the python versions used by specifying them in acceptedPythonInterpreters