Community Conundrum 25:Feature Visualization is now live! Read More

Python Plugin (a=1) fails: No module named matrixlib

Level 2
Python Plugin (a=1) fails: No module named matrixlib

I am struggling in building a Python plugin because it fails for the following error:

No module named matrixlib

The situation is exactly and simply the following:

- build a plugin without a dedicated environment (otherwise DSS by default only allow Python 2.7 even though I have other Code Env with Python 3.6)

- recipe.json is:

{
    "meta": {
        "label": "Kaggle Competitions Download",
        "description": "Use Kaggle API to download competition data.",
        "icon": "icon-puzzle-piece"
    },

    "kind": "PYTHON",
     "outputRoles": [
        {
            "name": "main_output",
            "label": "Folder to save zip file",
            "description": "what main output means",
            "arity": "UNARY",
            "required": false,
            "acceptsDataset": false,
            "acceptsManagedFolder": true
        }]
}

- recipe.py defined as:

a = 1

- no module imported. no __init__.py, nothing.

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
5 Replies
Dataiker
Dataiker

Hi,

Could you export your plugin to a .zip and attach the .zip (if you can't attach it, you can upload it to https://dl.dataiku.com and send the generated link instead)?

Please note that you can definitely create Python 3.6 code envs for a plugin. Create the code env item in the plugin, then edit the "desc.json" file, and add a line: "acceptedPythonInterpreters": ["PYTHON36"]

Please see https://doc.dataiku.com/dss/latest/plugins/reference/other.html#code-environments for more details.

Level 2
Author

Hi @Clément_Stenac ,

thank you for your quick reply. I will upload the zip later this day. Please note that I use DSS 7.

Also, it is not clear why a plugin executing only a=1, with no import whatsoever, presents the following error:

No module named matrixlib

To answer your point, in a different pluging with a dedicated code env (the plugin of this question does not have a dedicated code env) I observed that even though I set:

"acceptedPythonInterpreters": ["PYTHON36"]

When this plugin is executed as a Python recipe, it still call for Python 2.7 and still present the same error:

No module named matrixlib

This is why I tried to simplify the problem at the core, defining a plugin with nothing but a simple a=1.

Please let me know if you need additional information.

thank you

0 Kudos
Dataiker
Dataiker

@Seymour93 please see the answer on your other post re how to create a code-env using a different Python version.

Level 2
Author

Hi @Clément_Stenac,

please see attached my plugin as you requested. Link.

0 Kudos
Dataiker
Dataiker

Hi,

You likely have something using matrixlib somewhere in your project. Could you similarly attach a job diagnosis of your failing job ? From the job page, click on Actions > Download job diagnosis.

0 Kudos