ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

python测试开发django-189.安装celery==3.1.26.post2版本报错No matching distribution found for anyjson>=0.3.3

2022-04-03 17:32:25  阅读:451  来源: 互联网

标签:26 post2 celery 报错 setuptools error anyjson


前言

使用环境:
python 3.8
django 2.1.2
celery 3.1.26.post2

celery 版本安装

在安装celery版本 的时候报错No matching distribution found for anyjson>=0.3.3

Requirement already satisfied: kombu<3.1,>=3.0.37 in d:\django38\hrun2_web\venv\lib\site-packages (from
 celery==3.1.26.post2) (3.0.37)
Collecting anyjson>=0.3.3
  Using cached anyjson-0.3.3.tar.gz (8.3 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in anyjson setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

出现报错是安装anyjson>=0.3.3失败了。
具体原因是 setuptools从版本58.0.0开始不再支持2to3的builds,所以导致 anyjson 安装后不再可用。
解决问题办法,降级 setuptools 工具版本即可。

降级 setuptools

先查看当前安装的 setuptools 工具版本号Version: 61.3.1

>pip show setuptools
Name: setuptools
Version: 61.3.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: d:\django38\hrun2_web\venv\lib\site-packages
Requires:
Required-by: jsonschema

降级版本

>pip install --upgrade setuptools==57.5.0

接着就可以成功安装celery==3.1.26.post2

>pip install celery==3.1.26.post2

标签:26,post2,celery,报错,setuptools,error,anyjson
来源: https://www.cnblogs.com/yoyoketang/p/16096620.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有