简体   繁体   中英

Warning when importing Scikit-learn

The simple code

import sklearn

gives me the warning

:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject

What's going on?

I replicate this situation on my colab and it works fine. Error generate in your case because of library version issue.

As per the latest release scikit-learn requires:

Python (>= 2.6 or >= 3.3)
Numpy (>= 1.6.1)
SciPy (>= 0.9)

So possible solutions can be:

Check the version of Python, NumPy, and SciPy and if the version is below the requirement then install the latest one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM