Error installing and importing dataiku package

chinazoc Registered Posts: 2
edited July 16 in Setup & Configuration


I got assigned a new environment to run my python code and I noticed whenever I try to import dataiku, I get the error below:

/data/dataiku/dataiku-dss-10.0.5/python/dataiku/core/ FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  'boolean': np.bool
AttributeError                            Traceback (most recent call last)
<ipython-input-28-48b9a88073ed> in <cell line: 1>()
----> 1 import dataiku
      2 from dataiku import pandasutils as pdu
      3 import pandas as pd

/data/dataiku/dataiku-dss-10.0.5/python/dataiku/ in <module>
     11 from .base import remoterun
     12 from .core.base import is_container_exec
---> 13 from .core.dataset import Dataset, _dataset_writer_atexit_handler
     14 from .core.schema_handling import get_schema_from_df

/data/dataiku/dataiku-dss-10.0.5/python/dataiku/core/ in <module>
     33 # Module code
---> 34 from dataiku.core import flow, base, schema_handling, dkuio
     35 from dataiku.core.platform_exec import read_dku_json
     36 from dataiku.core.dkujson import dump_to_filepath, load_from_filepath

/data/dataiku/dataiku-dss-10.0.5/python/dataiku/core/ in <module>
     15     'float': np.float32,
     16     'double': np.float64,
---> 17     'boolean': np.bool
     18 }

/data/dataiku/dss_data/code-envs/python/python_39_data_analytics/lib64/python3.9/site-packages/numpy/ in __getattr__(attr)
    323         if attr in __former_attrs__:
--> 324             raise AttributeError(__former_attrs__[attr])
    326         if attr == 'testing':

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

I also tried to install 'dataiku' and I get the error below:

Looking in indexes:
ERROR: Could not find a version that satisfies the requirement dataiku (from versions: none)
ERROR: No matching distribution found for dataiku

Please help, this was working on the python in builtin env but not this environment. I am not sure why.


  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,737 Neuron

    This is a well known compatibility error due to changes in numpy package. Either upgrade to Dataiku v12 (which solves this) or request numpy<1.24 in your code environment.

Setup Info
      Help me…