文章目录
前言
MALib用到了很多依赖,这些依赖不同版本之间有一些区别,可能他们开发时候比较早了,我最近按照指导配置的时候遇到了一些问题,有的是别的库bug,最近才修复,这里记录一下。
AttributeError: module ‘aioredis’ has no attribute ‘create_redis’
方法 aioredis.create_redis
从版本2.0开始不再支持,所以需要降低版本:pip install 'aioredis<2.0'
https://stackoverflow.com/questions/68901119/module-aioredis-has-no-attribute-create-redis
ModuleNotFoundError: No module named ‘aiohttp.signals’
ray的bug,安装一个指定版本的库即可:pip install aiohttp==3.7
TypeError: Plain typing.NoReturn is not valid as type argument
大概是python的版本问题吧
https://github.com/ipfs-shipyard/py-ipfs-http-client/issues/235
TypeError: load() missing 1 required positional argument: ‘Loader’
YAML 5.1版本后弃用了yaml.load(file)这个用法,因为觉得很不安全,5.1版本之后就修改了需要指定Loader,通过默认加载器(FullLoader)禁止执行任意函数,该load函数也变得更加安全
用以下三种方式都可以
d1=yaml.load(file,Loader=yaml.FullLoader)
d1=yaml.safe_load(file)
d1 = yaml.load(file, Loader=yaml.CLoader)
或者就安装老版本:pip install 'yaml<5.1'
‘Worker’ object has no attribute ‘core_worker’
一般是worker死了,检查一下为啥