pygooglenews icon indicating copy to clipboard operation
pygooglenews copied to clipboard

i Can't Install it!!!

Open shred66 opened this issue 2 years ago • 8 comments

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

shred66 avatar Jan 03 '23 11:01 shred66

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.

andrewten45 avatar Jan 06 '23 23:01 andrewten45

@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

shred66 avatar Jan 07 '23 09:01 shred66

@andrewten45 you saved my life

GuguJow avatar Feb 17 '23 18:02 GuguJow

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

ak7991 avatar Apr 23 '23 16:04 ak7991

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

tyson-ni avatar May 03 '23 18:05 tyson-ni

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

m4ttgit avatar Jun 12 '23 03:06 m4ttgit

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

JackDance avatar Sep 21 '23 08:09 JackDance

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!

open-minded13 avatar Jul 15 '24 08:07 open-minded13