Anyjson设置中的错误命令:USE_2TO3无效
#25 3.990 × python setup.py egg_info did not run successfully.
#25 3.990 │ exit code: 1
#25 3.990 ╰─> [1 lines of output]
#25 3.990 error in anyjson setup command: use_2to3 is invalid.
#25 3.990 [end of output]
这是一个常见的错误,最常见的解决方案是将setuptools降低到58版。这对我不起作用。我尝试安装Python3-anyjson,但这也不起来。我完全不知所措。任何建议或帮助都将非常感谢。
如果很重要:此应用程序是传统意大利面条,我正在尝试将其抛光以进行迁移。没有任何形式的文件。
需求.txt如下:
cachetools>=2.0.0,<4
certifi==2018.10.15
Flask-Caching
Flask-Compress
Flask==2.0.3
cffi==1.2.1
diskcache
earthengine-api==0.1.239
gevent==21.12.0
google-auth>=1.17.2
google-api-python-client==1.12.1
gunicorn==20.1.0
httplib2.system-ca-certs-locater
httplib2==0.9.2
oauth2client==2.0.1
pyasn1-modules==0.2.1
redis
requests==2.18.0
werkzeug==2.1.2
six==1.13.0
pyasn1==0.4.1
Jinja2==3.1.1
itsdangerous==2.0.1
Flask-Celery-Helper
Flask-JWT==0.2.0
Flask-Limiter
Flask-Mail
Flask-Migrate
Flask-Restless==0.16.0
Flask-SQLAlchemy
Flask-Script
Flask-Testing
Flask==2.0.3
Pillow<=6.2.2
Shapely
beautifulsoup4
boto
celery==3.1.23
geopy
gevent==21.12.0
numpy<1.17
oauth2client==2.0.1
passlib
psycopg2
pyproj<2
python-dateutil==2.4.1
scipy
#25 3.990 × python setup.py egg_info did not run successfully.
#25 3.990 │ exit code: 1
#25 3.990 ╰─> [1 lines of output]
#25 3.990 error in anyjson setup command: use_2to3 is invalid.
#25 3.990 [end of output]
This is a common error which the most common solution to is to downgrade setuptools to below version 58. This was not working for me. I tried installing python3-anyjson but this didn't work either. I'm at a complete loss.. any advice or help is much appreciated.
If it matters: this application is legacy spaghetti and I am trying to polish it up for a migration. There's no documentation of any kind.
The requirements.txt is as follows:
cachetools>=2.0.0,<4
certifi==2018.10.15
Flask-Caching
Flask-Compress
Flask==2.0.3
cffi==1.2.1
diskcache
earthengine-api==0.1.239
gevent==21.12.0
google-auth>=1.17.2
google-api-python-client==1.12.1
gunicorn==20.1.0
httplib2.system-ca-certs-locater
httplib2==0.9.2
oauth2client==2.0.1
pyasn1-modules==0.2.1
redis
requests==2.18.0
werkzeug==2.1.2
six==1.13.0
pyasn1==0.4.1
Jinja2==3.1.1
itsdangerous==2.0.1
Flask-Celery-Helper
Flask-JWT==0.2.0
Flask-Limiter
Flask-Mail
Flask-Migrate
Flask-Restless==0.16.0
Flask-SQLAlchemy
Flask-Script
Flask-Testing
Flask==2.0.3
Pillow<=6.2.2
Shapely
beautifulsoup4
boto
celery==3.1.23
geopy
gevent==21.12.0
numpy<1.17
oauth2client==2.0.1
passlib
psycopg2
pyproj<2
python-dateutil==2.4.1
scipy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
如果在降级setuptools之后继续遇到错误,请确保安装了车轮:
更新(2023-11-02):由于Brian Peterson和Aaron的推荐,将删除Anyjson。
If keep getting the error after downgrading setuptools, make sure to have installed wheel:
UPDATE (2023-11-02): anyjson was removed thanks to Brian Peterson and Aaron recommendation.
安装低于58.0.0的setuptools版本解决了问题。
之所
Installing a version of setuptools lower than 58.0.0 solved the issue.
It happens because Use_2to3 has been removed from setuptools >=58.0.0 versions
之后
在我的电脑上工作!
and after that
worked on my pc!
我试图运行推荐的解决方案,并且由于某种原因而失败。我能够安装
anyjson
这样:curl -o https://files.pythonhosted.org/packages/c3/c3/c3/d4089e1a3e1a3dd255b46beb55555a92b0797cfffffffffffffffff。 3.3 。
tar zxvf anyjson-0.3.3.3.3.3.3.tar.gz
2to3 -w anyjson-0.3.3
pip intern anyjson-0.3.33 /
I tried to run the recommended solutions and all failed for one reason or another. I was able to install
anyjson
like this:curl -O https://files.pythonhosted.org/packages/c3/4d/d4089e1a3dd25b46bebdb55a992b0797cff657b4477bc32ce28038fdecbc/anyjson-0.3.3.tar.gz
echo '37812d863c9ad3e35c0734c42e0bf0320ce8c3bed82cd20ad54cb34d158157ba anyjson-0.3.3.tar.gz' | sha256sum --check
tar zxvf anyjson-0.3.3.tar.gz
2to3 -w anyjson-0.3.3
pip install anyjson-0.3.3/
升级PIP对我有用
pip install -upgrade pip
Upgrading pip is what worked for me
pip install --upgrade pip
降级setuptools对我有用
,然后
Downgrading setuptools worked for me
And then
安装SetUptools 57.5.0对我解决了相同的问题。
Installing setuptools 57.5.0 solved the same issue for me.