Operations (Python)


You need to have specific permissions to create, modify and use code environments. If you do not have these permissions, contact your DSS administrator.

Create a code environment

  • Go to Administration > Code envs
  • Click on “New Python env”
  • Give an identifier to your code environment. Only use A-Z, a-z, digits and hyphens


Code environment identifiers must be globally unique to the DSS instance, so use a complete and descriptive identifier

  • Choose the Python version that you want to use. DSS is compatible with Python versions 2.7, 3.4, 3.5 and 3.6.


  • The requested version of Python must be installed on your system (by your system administrator)
  • In most cases, you also need the Python development headers packages in order to install packages with pip. Depending on the OS, this system package (to be installed by the system administrator) is called “libpython-dev” or “python-devel”
  • Click on “Create”
  • DSS creates the code environment and installs the minimal set of packages


If you plan to use Visual Machine Learning with this code environment, it must include the scipy, scikit-learn, jinja2 and xgboost packages.


Support of python 3 code environment on Visual Machine Learning is experimental.

  • You are taken to the new environment page

Manage packages

You can manage the list of packages to install by clicking on the “Packages to install” tab.

You see here two lists:

  • A non-editable list of the “Base Packages”. These are packages that are required by your current settings. These packages cannot be removed, and you cannot modify their version. For more information, see Base packages
  • An editable list of “Requested Packages”. This is where you write the list of packages that you want in your virtual environment. To quickly add the required packages for visual machine learning and deep learning on CPU or GPU, click on “Add Sets of Packages” and make your selections. The required packages will be added to the Requested Packages list.

The list of requested packages is in the requirements.txt file format See the documentation about the format of requirements.txt. Each line must be a package name, optionally with constraints information.

For example:

  • tabulate
  • sklearn==0.18.2
  • sklearn>0.19

Once you have written the packages you want, click on Save and update. DSS downloads and installs the newly required packages

Afterwards, you can inspect the exact installed versions in the “Actually installed packages” tab.

Installing packages not available through pip

Unfortunately some packages are not available on pip, and usually installing the package requires to run the python setup.py install command.

TODO: Explain that admin first downloads them and then how to put that in requirements.txt


On the Permissions panel, you can control who has the rights to manage and use the code environment.

Owner. This is the DSS user that owns the code environment and has all access/permissions by default.

Usable by all. By default, all DSS users on this instance can use a code environment. If you need to restrict usage, deselect this checkbox and grant access to specific groups.

For each group defined in Security, you can grant permissions to update the packages in the code environment, update user access to the code environment, and use the code environment.

Container Exec

When running DSS processes in containers, you can specify which containers should include this code environment.