DSS install on osx (python environment)
How do I change the default python environment when installing DSS on mac from the default 2.7 to 3.7?
I want this piece of the installer script:
[Install] [+] Initializing Python environment
[+] Initializing Python environment using platform default
[Install] + Using default base Python for this platform : /usr/bin/python2.7
to point to /usr/bin/python3 (which is my python3.7 installation...)
Best Answer
-
Hi @Antonius
I assume you are using DSS9 because Python3.7 is supported starting only from DSS9. Also, if you have a previous DSS version and now upgraded to DSS9, before switching the python version please make sure that the code you have used for the built-in code env is compatible with Python3.7.
To switch the python version, you will need to rebuild the built-in env. For this please follow the next article:
The upgrade command should be:
dataiku-dss-VERSION/installer.sh -d DATA_DIR -u -P python3.7
Answers
-
Thanks! it did help the article regarding rebuild the environment, though tweaked for the mac mini I have.
-
-
Hi,
I picked the info for Linux and searched for the same process in Mac; I opened the Terminal and ran:
export DKUPYTHONBIN=/usr/local/bin/python3.7
I did a test to see if I did it right with:
echo $DKUPYTHONBIN
I did the above as to test if I could run DSS on my Mac mini M1 and it seems that it helped (plus other things I did, see post).
-
I was able to install python 3.6 on Mac OS 10.15.7 and then run the re-install python 3.6 in DSS.
I used homebrew to install pyenv to install python 3.6 with the commands
# install pyenv
brew install pyenv pyenv-virtualenv pyenv-virtualenvwrapper
# install prerequesits for pyenv compilation
brew install openssl readline sqlite3 xz zlib
# install latest python 3.6 as of April 2021
pyenv install 3.6.13
# make python 3.6.13 the global default for Python
pyenv global 3.6.13Then used the installation steps you recommended. However, finding the directories for the following in the reinstall command was a challenge:
dataiku-dss-VERSION
is /Applications/DataScienceStudio.app/Contents/Resources/kit/
DATA_DIR
is /Users/[Your Home Directory]/Library/DataScienceStudio/dss_home
On my computer, the command you described turned out to be:
/Applications/DataScienceStudio.app/Contents/Resources/kit/installer.sh -d
/Users/[Your Home Directory]/Library/DataScienceStudio/dss_home -u -P python3.6Note: You will have to replace your home director where it says [Your Home Directory]
I did not use the environment variable.
# setup the environment variable DKUPYTHONBIN
export DKUPYTHONBIN=/usr/local/bin/python3.7
# test the environment variable
echo $DKUPYTHONBINI did this with DSS 9.0.1 installed by homebrew.
-
For DSS 10.0.7 on Mac OS 10.15.7 using the new DSS Installer Application the location of the installer.sh file seems to have moved to
DATA_DIR/kits/dataiku-dss-10.0.7-osx
That said I'm was having difficulties getting older code environments to load in DSS 10.0.7. Turns out that a specific python library postal was the culprit. I think that I have things resolved after reinstall of the python Library.

