ImportError: cannot import name 'logsumexp' when trainning model with python3 & sklearn env

Yongchao_Li
Level 1
ImportError: cannot import name 'logsumexp' when trainning model with python3 & sklearn env

Hi, I tried to train a model using code env of python3 and sklearn, but it failed with 




ImportError: cannot import name 'logsumexp'


So, is the python3 supported for training?

0 Kudos
3 Replies
UserBird
Dataiker
Hi,

This seems to be a problem related to sklearn. Can you tell me the sklearn version in your code-env and what function you are using cause this error ?
0 Kudos
Yongchao_Li
Level 1
Author
Hi,

I created this Code Env in portal based on python3.6 and chose "Visual Michine Learning" as additional packages.

Version of sklearn is 0.20.3, and this error occured when I train the models of Ridge regression, SVM and Random forest( all three models that I tried).

The log indicated that the import error was caused when scipy.misc tried to import logsumexp.

I guess it might be caused by the version of scipy in sklearn, which is 1.3.0

thanks
0 Kudos
Yongchao_Li
Level 1
Author
I solved this by adding scipy==1.1.0 in additional packages to overwrite the scipy installed by sklearn
0 Kudos

Labels

?
Labels (1)
A banner prompting to get Dataiku