I managed to install a few popular python packages using pip in cmd.
(more speicifically using the command “py -m pip install “)
packages like numpy, pandas, matplotlib, pyqt5, etc. had no problem installing.
but some packages like scipy and scikit-learn give errors.
My OS is Windows 8 and Python verson is 3.8 .
The error message looks something like this:
Collecting scipy
Using cached scipy-1.10.1.tar.gz (42.4 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
╰─> [14 lines of output]
+ meson setup --prefix=C:UsersXYZAppDataLocalProgramsPythonPython38-32 C:UsersXYZAppDataLocalTemppip-
install-kcwepncoscipy_545e8a24382142de9b0a2e3bbeb71b01 C:UsersXYZAppDataLocalTemppip-install-kcwepnco
scipy_545e8a24382142d
e9b0a2e3bbeb71b01.mesonpy-k7npgzdqbuild --native-file=C:UsersXYZAppDataLocalTemppip-install-kcwepnco
scipy_545e8a24382142de9b0a2e3bbeb71b01.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
The Meson build system
Version: 1.4.1
Source dir: C:UsersXYZAppDataLocalTemppip-install-kcwepncoscipy_545e8a24382142de9b0a2e3bbeb71b01
Build dir: C:UsersXYZAppDataLocalTemppip-install-kcwepncoscipy_545e8a24382142de9b0a2e3bbeb71b01.mesonpy-
k7npgzdqbuild
Build type: native build
Project name: SciPy
Project version: 1.10.1
C compiler for the host machine: cl (msvc 12.00.8168 "Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
12.00.8168 for 80x86")
C linker for the host machine: link link 6.00.8168
....meson.build:1:0: ERROR: None of values ['c++14'] are supported by the C++ compiler. Possible values are
['none', 'none', 'c++11', 'vc++11']
A full log can be found at...
[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 have no idea what is going on.
I am relatively new to python, so a detailed solution or an easy one will be greatly appreciated.
Also a solution using pip is more preferable. I have no experience with anaconda.
I upgraded pip and also did try
py -m pip install --upgrade pip setuptools wheel
but still no luck after that.