'Install Scip optimization

I'm trying install Scip optimization for python and I'm following a video but in the video it is installing Scip Optimization 7, and I'm installing Scip Optimization 8. Then I need to install on prompt too.

pip install pyscipopt

but it gave me an error:

Microsoft Windows [versão 10.0.19043.1645]

(c) Microsoft Corporation. Todos os direitos reservados.

C:\Users\matsu>pip install pyscipopt Defaulting to user installation because normal site-packages is not writeable Collecting pyscipopt Using cached PySCIPOpt-4.2.0.tar.gz (661 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: wheel in c:\users\matsu\appdata\roaming\python\python39\site-packages (from pyscipopt) (0.37.1) Building wheels for collected packages: pyscipopt Building wheel for pyscipopt (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output] Assuming that SCIP is installed globally, because SCIPOPTDIR is undefined.

  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\Multidict.py -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\__init__.py -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\scip.pyx -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\scip.pxd -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\benders.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\benderscut.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\branchrule.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\conshdlr.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\cutsel.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\event.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\expr.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\heuristic.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\lp.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\nodesel.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\presol.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\pricer.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\propagator.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\reader.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\relax.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\sepa.pxi -> build\lib.win-amd64-3.9\pyscipopt
  running build_ext
  building 'pyscipopt.scip' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyscipopt Running setup.py clean for pyscipopt Failed to build pyscipopt Installing collected packages: pyscipopt Running setup.py install for pyscipopt ... error error: subprocess-exited-with-error

× Running setup.py install for pyscipopt did not run successfully. │ exit code: 1 ╰─> [31 lines of output] Assuming that SCIP is installed globally, because SCIPOPTDIR is undefined.

  running install
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\Multidict.py -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\__init__.py -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\scip.pyx -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\scip.pxd -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\benders.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\benderscut.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\branchrule.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\conshdlr.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\cutsel.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\event.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\expr.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\heuristic.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\lp.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\nodesel.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\presol.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\pricer.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\propagator.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\reader.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\relax.pxi -> build\lib.win-amd64-3.9\pyscipopt
  copying src\pyscipopt\sepa.pxi -> build\lib.win-amd64-3.9\pyscipopt
  running build_ext
  building 'pyscipopt.scip' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

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

× Encountered error while trying to install package. ╰─> pyscipopt

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Can anyone help me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source