skip to Main Content

I am trying to install sklearn/scipy/scikit-learn for a project in my windows laptop with Pycharm but it keeps failing with below error. When I try pip install sklearn from terminal it goes through but the program is not working and complaining still with the module not found error.

Not sure, why it’s failing with pycharm… Getting this error, which I am not sure what this is

*"WARNING: Failed to activate VS environment: Could not find C:Program Files (x86)Microsoft Visual StudioInstallervswhere.exe"*


*Collecting sklearn
  Using cached sklearn-0.0.tar.gz (1.1 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting scikit-learn
  Using cached scikit_learn-1.1.2-cp38-cp38-win32.whl (6.6 MB)
Collecting scipy>=1.3.2
  Using cached scipy-1.9.2.tar.gz (42.1 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 'error'
  error: subprocess-exited-with-error
  
  Getting requirements to build wheel did not run successfully.
  exit code: 1
  
  [49 lines of output]
  + meson setup --native-file=C:UsersvinodAppDataLocalTemppip-install-ka425mpgscipy_2429ab45c5ae41bc9802aaa34bafeb6e.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=C:UsersvinodAppDataLocalProgramsPythonPython38-32 C:UsersvinodAppDataLocalTemppip-install-ka425mpgscipy_2429ab45c5ae41bc9802aaa34bafeb6e C:UsersvinodAppDataLocalTemppip-install-ka425mpgscipy_2429ab45c5ae41bc9802aaa34bafeb6e.mesonpy-fpbohej2build
  The Meson build system
  Version: 0.63.3
  Source dir: C:UsersvinodAppDataLocalTemppip-install-ka425mpgscipy_2429ab45c5ae41bc9802aaa34bafeb6e
  Build dir: C:UsersvinodAppDataLocalTemppip-install-ka425mpgscipy_2429ab45c5ae41bc9802aaa34bafeb6e.mesonpy-fpbohej2build
  Build type: native build
  Project name: SciPy
  Project version: 1.9.2
  WARNING: Failed to activate VS environment: Could not find C:Program Files (x86)Microsoft Visual StudioInstallervswhere.exe
  
  ....meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
  The following exception(s) were encountered:
  Running `icl ""` gave "[WinError 2] The system cannot find the file specified"
  Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
  Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
  Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
  Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
  Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
  Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel 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.*

2

Answers


  1. Judging from the sklearn wheel that’s trying to be installed it looks like you are using 32-bit Python. scipy does not have 32-bit wheels available for version 1.9.2. The most recent version of scipy that offers 32-bit wheels is 1.9.1.

    You should be able to pip install scipy==1.9.1.

    Login or Signup to reply.
  2. I had the same problem. It’s resolved by:

    pip install vswhere
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search