Cannot replace the deprecated sklearn package with scikit-learn completely in ecommerce tools Library

import pandas as pd
import re
from tqdm import tqdm
from ecommercetools import seo

Querylist1 = ['denmark, inflation',
 'denmark, immigration',
 'denmark, global warming',
 'toronto, inflation',
 'toronto, immigration',
 'toronto, global warming',
 'washington, inflation',
]

targets = []
for query in tqdm(Querylist1):
  pages_num = 5

  conditions = ['wikipedia','twitter','linkedin','facebook','news'] 
  # Step 4.3: the main body. 
  try:
    res = seo.get_serps(query, pages=pages_num)
  except:
    continue
  for c in conditions[:]:
    temp1 = res[res['link'].str.contains(c,case=False)]['title'].to_list()
    temp2 = res[res['link'].str.contains(c,case=False)]['link'].to_list()
    if len(temp1)==0:
      y = ''
    else:
      y = temp1[0]
    if len(temp2)==0:
      z = ''
      continue
    else:
      z = temp2[0]
    targets.append([y,z,c,query])

targets = pd.DataFrame(targets, columns=['title','link','link category','query keyword used'])

print(targets)

This is a simple script. but when i run pip install ecommercetools following error is displayed:

error


PS C:UsersDELLDesktopNew folder> pip install ecommercetools
Collecting ecommercetools
  Using cached ecommercetools-0.42.9-py3-none-any.whl.metadata (54 kB)
Collecting gapandas (from ecommercetools)
  Using cached gapandas-1.0-py3-none-any.whl.metadata (4.1 kB)
Collecting httplib2>=0.15.0 (from ecommercetools)
  Using cached httplib2-0.22.0-py3-none-any.whl.metadata (2.6 kB)
Collecting lifetimes (from ecommercetools)
  Using cached Lifetimes-0.11.3-py3-none-any.whl.metadata (4.8 kB)
Requirement already satisfied: numpy in c:usersdellappdatalocalprogramspythonpython311libsite-packages (from ecommercetools) (1.26.3)
Requirement already satisfied: pandas in c:usersdellappdatalocalprogramspythonpython311libsite-packages (from ecommercetools) (2.2.0)
Collecting pycausalimpact (from ecommercetools)
  Using cached pycausalimpact-0.1.1-py2.py3-none-any.whl.metadata (8.3 kB)
Requirement already satisfied: requests in c:usersdellappdatalocalprogramspythonpython311libsite-packages (from ecommercetools) (2.31.0)
Requirement already satisfied: requests-html in c:usersdellappdatalocalprogramspythonpython311libsite-packages (from ecommercetools) (0.10.0)
Collecting sklearn (from ecommercetools)
  Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
      rather than 'sklearn' for pip commands.

      Here is how to fix this error in the main use cases:
      - use 'pip install scikit-learn' rather than 'pip install sklearn'
      - replace 'sklearn' by 'scikit-learn' in your pip requirements files
        (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
      - if the 'sklearn' package is used by one of your dependencies,
        it would be great if you take some time to track which package uses
        'sklearn' instead of 'scikit-learn' and report it to their issue tracker
      - as a last resort, set the environment variable
        SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

      More information is available at
      https://github.com/scikit-learn/sklearn-pypi-package
      [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 also installed scikit-learn. but installing ecommercetools displayed the same error.
the only understandable thing i can see is:

Collecting sklearn (from ecommercetools)
  Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
  Preparing metadata (setup.py) ... error

I think when i run pip install ecommercetools it tries to install the default sklearn instead of the new package that i installed ( scikit-learn )

Any help would be appreciated

as mentioned above

New contributor

Hassan Bin Aman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

To replace deprecated sklearn with scikit-learn, identify and update code sections that rely on outdated functionality, using compatible alternatives where needed. Check for broader library compatibility and review scikit-learn’s documentation for solutions or workarounds.

New contributor

jacksmito is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật