I'm attempting to install certain dependencies, such as scipy==1.9.3, scikit-learn==1.2.0, and transformers==4.25.1, and gunicorn==21.2.0 in windows 11 with python 3.12.0 and pip 23.3.1, but I'm encountering the following error:
C:\Users\Vahab>pip install scipy==1.9.3
Collecting scipy==1.9.3
Using cached scipy-1.9.3.tar.gz (42.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
+ meson setup C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234 C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\meson-python-native-file.ini
The Meson build system
Version: 1.2.3
Source dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234
Build dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg
Build type: native build
Project name: SciPy
Project version: 1.9.3
Activating VS 17.7.5
C compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
C linker for the host machine: link link 14.37.32825.0
C++ compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
C++ linker for the host machine: link link 14.37.32825.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-but-set-variable: NO (cached)
Compiler for C supports arguments -Wno-unused-function: NO
Compiler for C supports arguments -Wno-conversion: NO
Compiler for C supports arguments -Wno-misleading-indentation: NO
Compiler for C supports arguments -Wno-incompatible-pointer-types: NO
Library m found: NO
..\meson.build:57: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:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\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.
There is probably never going to be a scipy wheel with version 1.9.3 released for cp312. There is, however,
scipy-1.11.3-cp312-cp312-win_amd64.whl
available on PyPI (released on 23Sep).If you're willing to use cp311 instead you can use 1.9.3. However, if you really have to use cp312 then you'll need to use that more recent scipy version.
I don't think scipy==1.9.3 will build+pass tests on cp312, I wouldn't go further down the road of trying to build it.