Python Newscatcher抛出错误[重复]

4dc9hkyq  于 2022-11-19  发布在  Python
关注(0)|答案(1)|浏览(222)

此问题在此处已有答案

Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)(5个答案)
3天前关闭。
当我尝试在Conda虚拟环境(Python 3.7.13)中安装Newscatcher时,它抛出以下错误;我试了下面的办法;

pip install git+https://github.com/kotartemiy/newscatcher.git

以下是错误;

Collecting git+https://github.com/kotartemiy/newscatcher.git
  Cloning https://github.com/kotartemiy/newscatcher.git to /tmp/pip-req-build-d53hkjlh
  Running command git clone --filter=blob:none --quiet https://github.com/kotartemiy/newscatcher.git /tmp/pip-req-build-d53hkjlh
  Resolved https://github.com/kotartemiy/newscatcher.git to commit b86b1a650241be4e82941319698e01a33c0c01ac
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: requests<3.0.0,>=2.23.0 in ./anaconda3/envs/bot/lib/python3.7/site-packages (from newscatcher==0.2.0) (2.28.1)
Collecting tldextract<3.0.0,>=2.2.2
  Using cached tldextract-2.2.3-py2.py3-none-any.whl (48 kB)
Collecting feedparser<6.0.0,>=5.2.1
  Using cached feedparser-5.2.1.zip (1.2 MB)
  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 feedparser 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.

如果有人能解释一下这个错误是怎么回事,我想我可以解决它。任何输入都非常感谢!

olhwl3o2

olhwl3o21#

您尝试安装的模块有点旧(3年),但是安装工具在构建期间删除了对2to3的支持。
尝试降级setup tools

pip install "setuptools<58.0.0"

然后呢

pip install newscatcher --upgrade

相关问题