Intel® oneAPI Data Analytics Library
Learn from community members on how to build compute-intensive applications that run efficiently on Intel® architecture.

cannot import name 'printNumericTable'

yingxing__bao
Beginner
655 Views

After I install the pyDAAL according to this tutorial  and this tutorial, when I try to run the example "pca_cor_dense_online.py",I got the error "cannot import name 'printNumericTable'",And this is caused by the code 

from utils import printNumericTable

so how can I configure to correct this error?

0 Kudos
2 Replies
Preethi_V_Intel
Employee
655 Views

Hi,

You can find 'utils' in your Anaconda environment folder

~\envs\<anaconda env>\share\pydaal_examples\examples\python\source\utils

There are number of ways you can access this module in your python code. Below are a few

1. Move the utils folder to your current working directory

or

2. Append this folder to the system path in your Python script      

import sys
sys.path.append(<'utils' path>)

or

3. Move the utils folder to site-packages folder of your environment.

site-packages can be found here - ~\envs\<anaconda env>\Lib\site-packages

 

 

 

 

 

0 Kudos
yingxing__bao
Beginner
655 Views

Hi

Thank you for your reply.

I have solved the problem according to your method.

I installed the package utils through pip install utils  in the cmd before, so I guess the utils installed through cmd is different from the one you said.

 

0 Kudos
Reply