python3.8报错TypeError: an integer is required (got type bytes)

python3.8报错TypeError: an integer is required (got type bytes)

错误描述:

运行代码时报错:TypeError: an integer is required (got type bytes)
网上看到的大部分办法是要对python3.8进行降级,这个方法兴许能解决问题,但是太过于麻烦了!也有修改python自身的cloudpickle.py文件的,我这边改完后的结果就是继续一连串的bugs。

问题查找及分析:

看到大家最主要的问题关注点在scikit-learn这个库,不能适配python3.8。但是在stackoverflow中看到有相关问题的解决。
在这里插入图片描述
在终端输入:

pip install scikit-learn --upgrade

更新后可以解决该问题。

猜你喜欢

转载自blog.csdn.net/weixin_41868104/article/details/128100735