ml-news-article-scraper-example icon indicating copy to clipboard operation
ml-news-article-scraper-example copied to clipboard

Bug: PyYAML Installation Fails Due to cython_sources AttributeError

Open Sibam-Paul opened this issue 10 months ago • 6 comments

Description

I encountered an error while installing the dependencies using pip3 install -r requirements.txt on a Kali Linux system. The installation process fails while trying to build PyYAML, throwing an AttributeError: cython_sources. This issue seems related to a setuptools/distutils incompatibility as discussed here

Expected Behavior

The dependencies should install successfully without requiring manual intervention.

Steps to Reproduce

  1. Clone the repository.

  2. Run:

    metacall pip3 install -r requirements.txt
    
  3. The installation fails with the following error: log.file

Environment

  • OS: Kali Linux
  • Python Version: 3.10
  • Pip Version: 22.2.2

Sibam-Paul avatar Feb 16 '25 14:02 Sibam-Paul

@viferga raised should I fix it?

Sibam-Paul avatar Feb 16 '25 15:02 Sibam-Paul

Update on the issue :-

After fixing the problem for PyYaml it seems like there are conflict with versions of some dependencies as some depend on their versions

What I Am getting right now

ERROR: Cannot install -r requirements.txt (line 15) and tinysegmenter==0.4 because these package versions have conflicting dependencies.
The conflict is caused by:
    newspaper3k 0.2.8 depends on tinysegmenter==0.3
ERROR: Cannot install -r requirements.txt (line 24) and urllib3==2.3.0 because these package versions have conflicting dependencies.
The conflict is caused by:
    requests 2.24.0 depends on urllib3!=1.25.0, !=1.25.1,<1.26,>=1.21.1

getting same error for more dependencies unsuitability

Solution :-

Update the necessary dependencies to the latest versions

Sibam-Paul avatar Feb 18 '25 06:02 Sibam-Paul

now on metacall app.js it asks for link ` ──(kali㉿kali)-[~/ml-news-article-scraper-example] └─$ metacall app.js

Enter the News URL: https://www.nytimes.com/2021/03/23/business/teslas-autopilot-safety-investigations.html `

Sibam-Paul avatar Feb 18 '25 13:02 Sibam-Paul

After Fixing the above stated issue with this PR

When running the metacall app.js , the program ask for link of the article as stated in the above comment but then I am getting this error

It seems like the ml model on new dependencies need to be re-trained (as the old ones are deprecated which was preventing the requirement to get installed) as it is unable to load the pac.pkl model with old dependencies in requirements.txt

Sibam-Paul avatar Feb 19 '25 16:02 Sibam-Paul

Oh, this is bad, maybe we should deprecate the example...

viferga avatar Feb 21 '25 07:02 viferga

@viferga I think I can fix it only need the dataset from @HarshCasper

Sibam-Paul avatar Feb 21 '25 08:02 Sibam-Paul