kotartemiy / pygooglenews

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

error in installing pygooglenews #45

Open gjain7 opened 6 months ago

gjain7 commented 6 months ago

I have tried installing the library but it is failing to install itself. I used collab to run it and windows 11

!pip install pygooglenews --upgrade

Collecting pygooglenews Using cached pygooglenews-0.1.2-py3-none-any.whl (10 kB) Requirement already satisfied: beautifulsoup4<5.0.0,>=4.9.1 in /usr/local/lib/python3.10/dist-packages (from pygooglenews) (4.11.2) Collecting dateparser<0.8.0,>=0.7.6 (from pygooglenews) Using cached dateparser-0.7.6-py2.py3-none-any.whl (362 kB) Collecting feedparser<6.0.0,>=5.2.1 (from pygooglenews) Using cached feedparser-5.2.1.zip (1.2 MB) error: subprocess-exited-with-error

× python setup.py egg_info 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. Preparing metadata (setup.py) ... error 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.

climate-tech commented 6 months ago

same

patekOnlyPrograms commented 5 months ago

Yep i am having that issue as well using anaconda

BlueberryTech123 commented 5 months ago

So I have found a sort of workaround to this issue:

  1. Create a new file called pygooglenews.py
  2. Copy the code from https://github.com/kotartemiy/pygooglenews/blob/master/pygooglenews/__init__.py into the newly created file
  3. Manually install the packages: pip install feedparser pip install dateparser
  4. import pygooglenews like you would normally

jus gonna copy and paste this "solution"

patekOnlyPrograms commented 5 months ago

So I have found a sort of workaround to this issue:

  1. Create a new file called pygooglenews.py
  2. Copy the code from https://github.com/kotartemiy/pygooglenews/blob/master/pygooglenews/__init__.py into the newly created file
  3. Manually install the packages: pip install feedparser pip install dateparser
  4. import pygooglenews like you would normally

jus gonna copy and paste this "solution"

will verify if this works on my computer

rohan1827 commented 5 months ago

So I have found a sort of workaround to this issue:

  1. Create a new file called pygooglenews.py
  2. Copy the code from https://github.com/kotartemiy/pygooglenews/blob/master/pygooglenews/__init__.py into the newly created file
  3. Manually install the packages: pip install feedparser pip install dateparser
  4. import pygooglenews like you would normally

jus gonna copy and paste this "solution"

will verify if this works on my computer

not working for me!

BlueberryTech123 commented 5 months ago

not working for me!

Could I see your file hierarchy or any error(s) you got?

rohan1827 commented 5 months ago

not working for me!

Could I see your file hierarchy or any error(s) you got?

got it resolved, apparently feedparser is using a deprecated method 'base64.decodestring()' i had to replace the method with 'base64.decodebytes' in the package and it worked then.

vedanthv commented 2 months ago

@rohan1827 where should the method be replaced?

flinge commented 1 month ago

Error installing the package in Google Colab with the following output:

Collecting pygooglenews
  Downloading pygooglenews-0.1.2-py3-none-any.whl (10 kB)
Requirement already satisfied: beautifulsoup4<5.0.0,>=4.9.1 in /usr/local/lib/python3.10/dist-packages (from pygooglenews) (4.12.3)
Collecting dateparser<0.8.0,>=0.7.6 (from pygooglenews)
  Downloading dateparser-0.7.6-py2.py3-none-any.whl (362 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 362.0/362.0 kB 2.9 MB/s eta 0:00:00
Collecting feedparser<6.0.0,>=5.2.1 (from pygooglenews)
  Downloading feedparser-5.2.1.zip (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 17.7 MB/s eta 0:00:00
  error: subprocess-exited-with-error

  × python setup.py egg_info 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.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed