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

Yongchao_Li
Yongchao_Li Registered Posts: 3 ✭✭✭✭

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?

Answers

  • UserBird
    UserBird Dataiker, Alpha Tester Posts: 535 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 ?
  • Yongchao_Li
    Yongchao_Li Registered Posts: 3 ✭✭✭✭
    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
  • Yongchao_Li
    Yongchao_Li Registered Posts: 3 ✭✭✭✭
    I solved this by adding scipy==1.1.0 in additional packages to overwrite the scipy installed by sklearn
Setup Info
    Tags
      Help me…