解决mac系统下python2执行celery报错:AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not fou

成功解决mac系统下python2环境执行celery报错: File “/Users/lijiandong/miniconda3/envs/py2/lib/python2.7/ctypes/init.py”, line 384, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

File “/Users/lijiandong/miniconda3/envs/py2/lib/python2.7/ctypes/init.py”, line 384, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

百度谷歌找了很久发现, 很多issue 就是没有可用的解决方法如下:

最终解决方案

  • 卸载python2,使用anaconda重新安装
    操作如下:
# pip uninstall celery
# conda remove -n py2 --all
# conda create -n py2 python=2.7
# pip install celery
# clelery -h
>Options:
  -A APP, --app=APP     app instance to use (e.g. module.attr_name)
  -b BROKER, --broker=BROKER
                        url to broker.  default is 'amqp://guest@localhost//'
  --loader=LOADER       name of custom loader class to use.
  --config=CONFIG       Name of the configuration module
  --workdir=WORKING_DIRECTORY
---- -- - - ---- Commands- -------------- --- ------------

+ Main: 
|    celery worker
|    celery events
|    celery beat
|    celery shell
|    celery multi
|    celery amqp

+ Remote Control: 
|    celery status
 
|    celery inspect --help
|    celery inspect active



玛德 终于成功了 !
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值