kotartemiy / pygooglenews

If Google News had a Python library
https://newscatcherapi.com
MIT License
1.26k stars 134 forks source link

error in feedparser setup command: use_2to3 is invalid. #40

Open omar-yehia opened 1 year ago

omar-yehia commented 1 year ago

I tried to install it pip install pygooglenews

but I got this error

. . Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel 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: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

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

markus-lei commented 1 year ago

Hello,

I have the same issue on Mac OS. Tried downgrading setuptools but did not work :(

Kamilcuk commented 1 year ago

https://bobbyhadz.com/blog/python-error-in-package-setup-command-use-2to3-is-invalid

ghost commented 1 year ago

The error message due to a breaking change in setuptools version 58.0.0. The setuptools package has removed support for 2to3 during builds. You can try downgrading setup tools by running this command: pip install "setuptools<58.0". After that, you can try running your pip install command again. I hope this helps!

benputman commented 1 year ago

this worked for me. (On Mac OS 13.4.1, Python 3.10.12)

pip install "setuptools<58.0"
pip install feedparser --upgrade
pip install setuptools

first line got it installed and the second resolved the outdated feedparser issue. Last line returns setuptools to normal