I tried installing PySCIPOpt with pip by doing "pip install pyscipopt" using this guideline:
https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md and looking at diffrent questions with the same problem. I'm running Python 3.8 with Anaconda on a 64-bit Windows 10 machine.
I have sucessfully installed th SCIP Optimization Suite. I do have the folders lib and include and in the folder include there is a file scipscip.h. And finally I installed Microsoft Visual C++ 14.0.
I run the following commands in the Anaconda Prompt:
set SCIPOPTDIR=C:Program FilesSCIPOptSuite 7.0.0
pip install pyscipopt
I've also tried diffrent variations like for example:
set SCIPOPTDIR="C:Program FilesSCIPOptSuite 7.0.0"
set PATH=%PATH%;%SCIPOPTDIR%in
python -m pip install pyscipopt
However I keep getting the following error message.What am I doing wrong?
Collecting PySCIPOpt
Using cached PySCIPOpt-3.1.0.tar.gz (619 kB)
Building wheels for collected packages: PySCIPOpt
Building wheel for PySCIPOpt (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:Users<>anaconda3envs<>python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"'; __file__='"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:Users<>AppDataLocalTemppip-wheel-qi79u70_'
cwd: C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0a
Complete output (29 lines):
Using include path <C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0asrc>.
Using SCIP library <libscip> at <C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0alib>.
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-3.8
creating buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptMultidict.py -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt\__init__.py -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptscip.pyx -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptscip.pxd -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptenders.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptenderscut.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptranchrule.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptconshdlr.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptevent.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptexpr.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptheuristic.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptlp.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt
odesel.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpresol.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpricer.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpropagator.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt
elax.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptsepa.pxi -> buildlib.win-amd64-3.8pyscipopt
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/
----------------------------------------
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: Command errored out with exit status 1:
command: 'C:Users<>anaconda3envs<>python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"'; __file__='"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Users<>AppDataLocalTemppip-record-o4qinppninstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:Users<>anaconda3envs<>IncludePySCIPOpt'
cwd: C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0a
Complete output (29 lines):
Using include path <C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0asrc>.
Using SCIP library <libscip> at <C:Users<>AppDataLocalTemppip-install-b0tospyzpyscipopt_5f447b30c7094ccaa5631ff01e4dab0alib>.
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.8
creating buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptMultidict.py -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt\__init__.py -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptscip.pyx -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptscip.pxd -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptenders.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptenderscut.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptranchrule.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptconshdlr.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptevent.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptexpr.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptheuristic.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptlp.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt
odesel.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpresol.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpricer.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptpropagator.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipopt
elax.pxi -> buildlib.win-amd64-3.8pyscipopt
copying srcpyscipoptsepa.pxi -> buildlib.win-amd64-3.8pyscipopt
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:Users<>anaconda3envs<>python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"'; __file__='"'"'C:\Users\<>\AppData\Local\Temp\pip-install-b0tospyz\pyscipopt_5f447b30c7094ccaa5631ff01e4dab0a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Users<>AppDataLocalTemppip-record-o4qinppninstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:Users<>anaconda3envs<>IncludePySCIPOpt' Check the logs for full command output.
question from:
https://stackoverflow.com/questions/65884582/installing-pyscipopt-via-pip-doesnt-work 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…