DSS install on osx (python environment)

Antonius
Antonius Posts: 4 ✭✭✭✭

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

Answers

  • Antonius
    Antonius Posts: 4 ✭✭✭✭

    Thanks! it did help the article regarding rebuild the environment, though tweaked for the mac mini I have.

  • tgb417
    tgb417 Posts: 1,649 Neuron

    @Antonius
    ,

    What were your tweeks? I have a similar config as you.

  • Antonius
    Antonius Posts: 4 ✭✭✭✭
    edited July 2024

    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).

  • tgb417
    tgb417 Posts: 1,649 Neuron
    edited July 2024

    @sergeyd

    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.13

    Then 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.6 

    Note: 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 $DKUPYTHONBIN

    I did this with DSS 9.0.1 installed by homebrew.

  • tgb417
    tgb417 Posts: 1,649 Neuron
    edited July 2024

    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.

Setup Info
    Tags
      Help me…