Error while installing sklearn.linear_model with pip

am trying to install scikit-learn and pandas using pip on my Windows machine, but I keep encountering the following error. I tried reinstalling pip, but the issue persists. Here’s what I’ve done so far:

C:WindowsSystem32> pip install scikit-learn
Collecting scikit-learn
  Using cached scikit_learn-1.5.1.tar.gz (7.0 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      Collecting meson-python>=0.16.0
        Using cached meson_python-0.16.0-py3-none-any.whl.metadata (4.1 kB)
      Collecting Cython>=3.0.10
        Using cached Cython-3.0.11-py2.py3-none-any.whl.metadata (3.2 kB)
      Collecting numpy>=2.0.0rc2
        Using cached numpy-2.1.1-cp311-cp311-mingw_x86_64.whl
      Collecting scipy>=1.6.0
        Using cached scipy-1.14.1.tar.gz (58.6 MB)
        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'
        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

        [40 lines of output]
        + meson setup C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860 C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860.mesonpy-f5huf210 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860.mesonpy-f5huf210meson-python-native-file.ini
        The Meson build system
        Version: 1.5.1
        Source dir: C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860
        Build dir: C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860.mesonpy-f5huf210
        Build type: native build
        Project name: scipy
        Project version: 1.14.1
        C compiler for the host machine: cc (gcc 13.2.0 "cc (Rev2, Built by MSYS2 project) 13.2.0")
        C linker for the host machine: cc ld.bfd 2.41
        C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (Rev2, Built by MSYS2 project) 13.2.0")
        C++ linker for the host machine: c++ ld.bfd 2.41
        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:msys64mingw64binpython.exe)
        Did not find pkg-config by name 'pkg-config'
        Found pkg-config: NO
        Run-time dependency python found: YES 3.11
        Program cython found: YES (C:UsersNhoxboonAppDataLocalTemppip-build-env-dpiy_zy6overlaybincython.EXE)
        Compiler for C supports arguments -Wno-unused-but-set-variable: YES
        Compiler for C supports arguments -Wno-unused-function: YES
        Compiler for C supports arguments -Wno-conversion: YES
        Compiler for C supports arguments -Wno-misleading-indentation: YES
        Library m found: YES

        ..meson.build:84:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
        The following exception(s) were encountered:
        Running `ifort --version` gave "[WinError 2] The system cannot find the file specified"
        Running `ifort -V` gave "[WinError 2] The system cannot find the file specified"
        Running `gfortran --version` gave "[WinError 2] The system cannot find the file specified"
        Running `gfortran -V` gave "[WinError 2] The system cannot find the file specified"
        Running `flang --version` gave "[WinError 2] The system cannot find the file specified"
        Running `flang -V` gave "[WinError 2] The system cannot find the file specified"
        Running `pgfortran --version` gave "[WinError 2] The system cannot find the file specified"
        Running `pgfortran -V` gave "[WinError 2] The system cannot find the file specified"
        Running `g95 --version` gave "[WinError 2] The system cannot find the file specified"
        Running `g95 -V` gave "[WinError 2] The system cannot find the file specified"

        A full log can be found at C:UsersNhoxboonAppDataLocalTemppip-install-vye30m4uscipy_7ccac87e7a8d4346b9d9d86617c5a860.mesonpy-f5huf210meson-logsmeson-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.
  1. Tried pip install scikit-learn and pip install pandas but received the same error.

  2. Tried deleting pip and reinstalling, but no changes.

  3. Tried with a different package (pandas), but got the same error.

1

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