DSS has its own Python virtual environment, dedicated to run any Python components of the studio, including any user-installed supplementary packages.
Importantly, this implies that in order to install packages you must NOT use the pip or python commands of your system, but use the pip or python commands of the DSS virtualenv.
There are three kinds of installation:
python setup.py installcommand;
First open a terminal and go to the DSS data directory. To use the DSS pip, you must use the
bin/pip command. For instance, to know which Python packages are currently available in DSS you can run the command:
cd DATA_DIR ./bin/pip list
And to install a package:
cd DATA_DIR ./bin/pip install package_name
If everything went well, you should see at the end of your command:
Successfully installed package_name Cleaning up...
Note that upgrading scikit-learn or pandas is not suported, as DSS relies a lot on it for the machine learning part, and small API changes are likely to break things. We do however upgrade various dependencies of DSS when releasing a new version, after they are properly qualified and we made sure everything works together.
Unfortunately some packages are not available on pip, and usually installing the package requires to run the
python setup.py install command.
Here’s how you can proceed. First open a terminal and go to the DSS data directory. Finally instead of running
python setup.py install, run the following command:
cd DATA_DIR ./bin/pip install -e package_directory
package_directory refers to the path to the package directory, which contains the setup.py file.
If you have custom python code, for instance a module with user-defined functions and classes, you can copy them in the
lib/python subdirectory of the DSS data directory. Then you will be able to import them in all Python recipes or notebooks within the studio.