Python libraries

Dear all, I am new to the platform and I was wondering what is the best way of adding new libraries to the existing python environment. Say I want to import “datawig” (missing values imputation), to use in my script. How should I go about adding this library into the framework? Thanks in advance!

Hi Alex, welcome to the community!

This is a really good question. We do not currently have a lightweight way to define script’s dependencies, although this feature is coming. Currently, the only way to run a script in the specified environment is to include it into the package, and reference the corresponding conda environment (that is also part of the package). To illustrate the idea, take a look at the scalogram script (note the “#environment: scalogram” line), and the corresponding scalogram.yaml environment.

The bad news is that the datawig library you mentioned is not part of the conda distribution. We did try to include it to the conda environment yaml file as a pip dependency, however we did not succeed yet; @vnerozin will be looking deeper into it. I would suggest to avoid pip dependencies for now if possible; in the meantime, we’ll try to find a good solution for the problem.

1 Like