why do my python package installations fail?

whenever i try to install a python package such as easyocr or transformers from the attached requirements.txt, i get the error as shown in the attached code snippet.
the contents of requirements.txt:

easyocr==1.7.1
matplotlib==3.9.1.post1
opencv-python-headless==4.10.0.84

the line below makes me think that there may be a problem with my python distribution, or permissions associated with it:
note: This error originates from a subprocess, and is likely not a problem with pip.

to solve the issue, i have tried the following:

  • modifying user permissions in C:/Users/lenovo/AppData/Local/Temp
  • installing the package with the –user flag
  • upgrading pip with python -m pip install –upgrade pip: this fails in totality saying the wheel distribution isn’t supported
  • installing the package outside my venv, which halts inordinately and i have to stop the execution

all of these still resulted in the error log below

$ pip install -r requirements.txt
WARNING: Ignoring invalid distribution -ip (c:/users/lenovo/onedrive - strathmore university/desktop/pythonprojects/tsh_cv/venv/lib/python3.10/site-packages)
Collecting easyocr==1.7.1 (from -r requirements.txt (line 1))
  Using cached easyocr-1.7.1-py3-none-any.whl.metadata (11 kB)
Collecting matplotlib==3.9.1.post1 (from -r requirements.txt (line 2))
  Downloading matplotlib-3.9.1.post1.tar.gz (36.1 MB)
     ---------------------------------------- 36.1/36.1 MB 2.3 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  pip subprocess to install build dependencies did not run successfully.
  exit code: 1

  [60 lines of output]
  Collecting meson-python>=0.13.1
    Downloading meson_python-0.16.0-py3-none-any.whl.metadata (4.1 kB)
  Collecting pybind11>=2.6
    Downloading pybind11-2.13.1-py3-none-any.whl.metadata (9.5 kB)
  Collecting setuptools_scm>=7
    Downloading setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
  Collecting numpy<2.3,>=2.0.0rc1
    Downloading numpy-2.0.1.tar.gz (18.9 MB)
       ---------------------------------------- 18.9/18.9 MB 2.7 MB/s eta 0:00:00
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Installing backend dependencies: started
    Installing backend dependencies: still running...
    Installing backend dependencies: still running...
    Installing backend dependencies: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error

    Preparing metadata (pyproject.toml) did not run successfully.
    exit code: 1

    [24 lines of output]
    + C:/Users/lenovo/OneDrive - Strathmore University/Desktop/PythonProjects/tsh_cv/venv/bin/python3.exe C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a/vendored-meson/meson/meson.py setup C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a/.mesonpy-45v6gfao -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a/.mesonpy-45v6gfao/meson-python-native-file.ini
    The Meson build system
    Version: 1.4.99
    Source dir: C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a
    Build dir: C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a/.mesonpy-45v6gfao
    Build type: native build
    Project name: NumPy
    Project version: 2.0.1
    C compiler for the host machine: cc (gcc 12.1.0 "cc (Rev3, Built by MSYS2 project) 12.1.0")
    C linker for the host machine: cc ld.bfd 2.38
    C++ compiler for the host machine: c++ (gcc 12.1.0 "c++ (Rev3, Built by MSYS2 project) 12.1.0")
    C++ linker for the host machine: c++ ld.bfd 2.38
    Cython compiler for the host machine: cython (cython 3.0.11)
    Host machine cpu family: x86_64
    Host machine cpu: x86_64
    Program python found: YES (C:/Users/lenovo/OneDrive - Strathmore University/Desktop/PythonProjects/tsh_cv/venv/bin/python3.exe)
    Did not find pkg-config by name 'pkg-config'
    Found pkg-config: NO
    Could not find Python3 library 'C:/Users/lenovo/OneDrive - Strathmore University/Desktop/PythonProjects/tsh_cv/venv/lib/libpython3.10.dll.a'
    Run-time dependency python found: NO (tried pkgconfig, pkgconfig and sysconfig)

    ../meson.build:41:12: ERROR: Python dependency not found

    A full log can be found at C:/Users/lenovo/AppData/Local/Temp/pip-install-vkcloeqi/numpy_905328b29e3b48ca93ae283cd8097d9a/.mesonpy-45v6gfao/meson-logs/meson-log.txt
    [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.
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies 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.

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