scikit-multiflow 0.5.3 安装流程
说在前面
在复现实验的时候需要安装这个包,这安装过程对于我一个第一次配置深度学习环境的人来说极为艰难,网上也没有详细的资料来说明,特此记录一下我自己摸索的流程。
参考资料
-
https://github.com/scikit-multiflow/scikit-multiflow#%E5%9B%A0%E4%B8%BAscikit-multiflow
具体步骤
这些包的版本号都是经过实践,互相兼容,功能齐全的版本,可以放心使用
这里安装的是scikit-multiflow0.5.3
以下操作请按顺序执行,如果某些包已经安装了可以直接跳过
- 因为scikit-multiflow对于python的版本有限制,这里使用python 3.8, 注意要64位的
- 安装 numpy 1.21.5
- 安装 sortedcontainers 2.4.0
- 安装 scipy 1.10.1
- 安装 matplotlib 3.5.1
- 安装 scikit-learn 1.0.2
- 安装 pandas 2.0.0
- 安装 scikit-multiflow 0.5.3
过程中可能出现的问题
问题一
AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘
原因:numpy与pandas版本不匹配!
按照我的版本安装就不会不匹配
解决方案:
- 进入所在的环境,分别卸载掉原有的numpy和pandas
# 卸载pandas
pip uninstall pandas
# 卸载numpy
pip uninstall numpy
- 重新安装numpy和pandas,安装顺序为先numpy,后pandas
# 安装 numpy
pip install numpy==1.21.5 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
# 安装 pandas
pip install pandas==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
问题二
ImportError cannot import name _imaging from PIL
原因:系统会自动匹配默认版本的PIL
解决方案:
将默认版本的PIL卸载,重新安装我们需要的PIL
- 卸载PIL
pip uninstall pillow
- 重新安装PIL
pip install pillow
问题三
No module named ‘kiwisolver._cext‘
原因:系统会自动匹配默认版本的kiwisolver
解决方案:
- 卸载现有的kiwisolver
pip uninstall kiwisolver
- 重新安装
pip install kiwisolver