kotartemiy / pygooglenews

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

i Can't Install it!!! #33

Open shred66 opened 1 year ago

shred66 commented 1 year ago

i tried pip install pygooglenews on the cmd, and also on the terminal of VisualStudio Code but it gives me this error everytime:

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.

i tried different methods, such as to upgrade pip, pip3, and various solutions people propose here: https://github.com/facebook/prophet/issues/418

but nothing works....

If someone has any help, it would be helpful! Thanks

andrewten45 commented 1 year ago

Hey, this might be helpful since I also had the same issue. I found out through a little digging that setuptools versions after v58 break use_2to3 functionality in certain packages. After running pip install setuptools==58, pip install pygooglenews --upgrade went through without any issue.

shred66 commented 1 year ago

@andrewten45 thank you!! Due to time limit i also tried using another similar package gnews , from gnews import GNews and it worked fine with python 3.11 and pip/pip3 22.3.1

GuguJow commented 1 year ago

@andrewten45 you saved my life

ak7991 commented 1 year ago

Generally updating setuptools or wheel or ez_setup resolves such bugs... But apparently in this case setuptools of the particular version number <=58 was needed as @andrewten45.... Thanks for the guidance and bug analysus @andrewten45

tyson-ni commented 1 year ago

I ran into the same issue on Macbook, however pip install setuptools==58 didn't solve it for me.

m4ttgit commented 1 year ago

i found the solution in the link below : https://stackoverflow.com/questions/75565954/giving-error-while-installing-the-package-in-python/75566372#75566372.

JackDance commented 10 months ago

I attempted the following steps and succeeded.

  1. install specified version of setuptools pip install setuptools==57.5.0
  2. install pygooglenews pip install pygooglenews
open-minded13 commented 2 weeks ago

Hey, this might be helpful since I also had the same issue. I found out through a little digging that setuptools versions after v58 break use_2to3 functionality in certain packages. After running pip install setuptools==58, pip install pygooglenews --upgrade went through without any issue.

Your approach is still helpful. Thank you so much!