如何在 VS 代码中安装 CVXOPT
How to install CVXOPT in VS code
尝试在 VS 代码中安装 CVXOPT 每次都失败,到目前为止我已经尝试使用 wheel 文件安装,tar 文件,只是 pip install,pip install --user 和其他,但每次都失败有同样的错误,我不知道。
(env) PS C:\Users\paseckat> python pip install cvxopt
我得到的错误:
Processing c:\users\paseckat\cvxopt-1.2.5.tar.gz
Installing collected packages: cvxopt
Running setup.py install for cvxopt ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\paseckat\spo_apiapp\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"'; __file__='"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Temp\pip-record-pxi98yoc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paseckat\spo_apiapp\env\include\site\python3.8\cvxopt'
cwd: C:\Temp\pip-req-build-cu6ofxeh\
Complete output (228 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\cvxopt
copying src\python\coneprog.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\cvxprog.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\info.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\misc.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\modeling.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\msk.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\printing.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\solvers.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\_version.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\__init__.py -> build\lib.win-amd64-3.8\cvxopt
UPDATING build\lib.win-amd64-3.8\cvxopt/_version.py
set build\lib.win-amd64-3.8\cvxopt/_version.py to '1.2.5'
running build_ext
building 'base' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
creating build\temp.win-amd64-3.8\Release\src\C
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/base.c /Fobuild\temp.win-amd64-3.8\Release\src/C/base.obj
base.c
src/C/base.c(150): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/base.c(279): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/base.c(419): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(516): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(517): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(518): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(660): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(661): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(688): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(816): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(781): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(782): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(891): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(911): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1098): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/base.c(1202): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1472): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1650): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1912): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1871): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1872): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/dense.c /Fobuild\temp.win-amd64-3.8\Release\src/C/dense.obj
dense.c
src/C/dense.c(271): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/dense.c(333): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(361): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(377): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(388): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(430): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(456): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(469): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(483): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(486): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(593): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(734): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(748): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(794): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(794): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(795): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(795): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(825): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(878): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(892): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(906): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(940): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(947): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(947): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(948): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(948): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(988): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(1006): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(1023): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/sparse.c /Fobuild\temp.win-amd64-3.8\Release\src/C/sparse.obj
sparse.c
src/C/sparse.c(243): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(424): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(471): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(570): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(603): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(613): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(622): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(641): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(656): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(663): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(679): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(698): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(707): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(716): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(745): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(748): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(755): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(761): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(769): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(791): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(808): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(814): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(836): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(895): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(921): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(845): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(862): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(945): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1017): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1056): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(959): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(975): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1083): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1092): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1079): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1121): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1135): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1117): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1163): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1164): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1160): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1204): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1205): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1201): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1271): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1272): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1303): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1304): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1324): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1325): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1360): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1361): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1381): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1399): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1416): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1419): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1463): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1474): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1480): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1498): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1501): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1568): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1607): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1640): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1641): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1682): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1683): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1707): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1711): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1752): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1756): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1787): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1818): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1846): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1853): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1919): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1939): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1950): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1977): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1984): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2084): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2152): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2182): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2185): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2215): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2216): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2236): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2237): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2271): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2272): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2305): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2344): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2354): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2254): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2303): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2328): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2564): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2806): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(2807): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(2851): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2852): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2881): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2914): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2923): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2936): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2937): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2938): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3000): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(3001): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(3131): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3149): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3159): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3163): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3169): warning C4244: 'return': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3197): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3219): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3283): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3457): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3458): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3471): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3486): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3588): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3636): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3653): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3666): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3675): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3736): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3752): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3763): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3773): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3837): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3838): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3908): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3924): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3937): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3948): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4025): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4039): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4049): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4061): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4101): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4346): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4367): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4429): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4436): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/lib /LIBPATH:c:\users\paseckat\spo_apiapp\env\libsles (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\lib.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\lib.0.17763.0\um\x64" m.lib lapack.lib blas.lib /EXPORT:PyInit_base build\temp.win-amd64-3.8\Release\src/C/base.obj build\temp.win-amd64-3.8\Release\src/C/dense.obj build\temp.win-amd64-3.8\Release\src/C/sparse.obj /OUT:build\lib.win-amd64-3.8\cvxopt\base.cp38-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.8\Release\src/C\base.cp38-win_amd64.lib
LINK : fatal error LNK1181: cannot open input file 'm.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paseckat\spo_apiapp\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"'; __file__='"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Temp\pip-record-pxi98yoc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paseckat\spo_apiapp\env\include\site\python3.8\cvxopt' Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
不确定这到底是什么意思:
LINK : fatal error LNK1181: cannot open input file 'm.lib' error: command 'C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\link.exe' failed with exit status 118
有人能帮忙或以前看过吗?
根据你提供的信息,我在python3.8使用pip安装“cvxopt
”时,遇到了和你一样的情况。
原因:“cvxopt
”安装依赖于“wheel
”,但“wheel
”不支持[=39= .8 版本.
在 CVXOPT 文档中:“Windows 的轮子:可用于 Python 2.7、3.5、3.6 和 3.7(仅限 64 位)”
解决方法:
当我使用来自 python3.7 的 pip 安装“cvxpot
”时:
另外,在VSCode的conda环境下也可以使用“conda install cvxpot
”安装,前提是使用的python也是合格的如Python3.7.
参考:CVXOPT.
我需要手动安装库。
- 我检查了我的 python 版本:在命令行中:
python --version
(我的版本是3.8.6)
- 我更新了
numpy
到最新版本:1.19.2
- 从命令行获取 numpy 版本:
python -c "import numpy; print(numpy.version.version)"
pip install numpy --upgrade
1.19.2
: 这是numpy版本
cp38
:这是Python版本,如果你有不同的版本,寻找你的numpy+mkl
的其他版本
cp38
:这是Python版本
- 手动安装:首先要安装
numpy+mkl
- cd <文件路径>
python -m pip install numpy-1.19.2+mkl-cp38-cp38-win32.whl
python -m pip install cvxopt-1.2.5-cp38-cp38-win32.whl
尝试在 VS 代码中安装 CVXOPT 每次都失败,到目前为止我已经尝试使用 wheel 文件安装,tar 文件,只是 pip install,pip install --user 和其他,但每次都失败有同样的错误,我不知道。 (env) PS C:\Users\paseckat> python pip install cvxopt
我得到的错误:
Processing c:\users\paseckat\cvxopt-1.2.5.tar.gz
Installing collected packages: cvxopt
Running setup.py install for cvxopt ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\paseckat\spo_apiapp\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"'; __file__='"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Temp\pip-record-pxi98yoc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paseckat\spo_apiapp\env\include\site\python3.8\cvxopt'
cwd: C:\Temp\pip-req-build-cu6ofxeh\
Complete output (228 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\cvxopt
copying src\python\coneprog.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\cvxprog.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\info.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\misc.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\modeling.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\msk.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\printing.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\solvers.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\_version.py -> build\lib.win-amd64-3.8\cvxopt
copying src\python\__init__.py -> build\lib.win-amd64-3.8\cvxopt
UPDATING build\lib.win-amd64-3.8\cvxopt/_version.py
set build\lib.win-amd64-3.8\cvxopt/_version.py to '1.2.5'
running build_ext
building 'base' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
creating build\temp.win-amd64-3.8\Release\src\C
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/base.c /Fobuild\temp.win-amd64-3.8\Release\src/C/base.obj
base.c
src/C/base.c(150): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/base.c(279): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/base.c(419): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(516): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(517): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(518): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(660): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(661): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(688): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(816): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(781): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(782): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(891): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(911): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1098): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/base.c(1202): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1472): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1650): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1912): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1871): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/base.c(1872): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/dense.c /Fobuild\temp.win-amd64-3.8\Release\src/C/dense.obj
dense.c
src/C/dense.c(271): warning C4244: '=': conversion from 'Py_ssize_t' to 'double', possible loss of data
src/C/dense.c(333): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(361): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(377): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(388): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(430): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(456): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(469): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(483): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(486): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(593): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(734): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(748): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(794): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(794): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(795): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(795): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(825): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(878): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(892): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(906): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(940): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(947): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(947): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(948): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(948): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(988): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(1006): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/dense.c(1023): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -Ic:\users\paseckat\spo_apiapp\env\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt" /Tcsrc/C/sparse.c /Fobuild\temp.win-amd64-3.8\Release\src/C/sparse.obj
sparse.c
src/C/sparse.c(243): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(424): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(471): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(570): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(603): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(613): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(622): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(641): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(656): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(663): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(679): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(698): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(707): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(716): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(745): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(748): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(755): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(761): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(769): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(791): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(808): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(814): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(836): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(895): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(921): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(845): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(862): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(945): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1017): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1056): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(959): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(975): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1083): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1092): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1079): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1121): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1135): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1117): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1163): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1164): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1160): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1204): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1205): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1201): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1271): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1272): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1303): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1304): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1324): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1325): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1360): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1361): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1381): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1399): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1416): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1419): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1463): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1474): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1480): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1498): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1501): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1568): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1607): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1640): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1641): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1682): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1683): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1707): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1711): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1752): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1756): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1787): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1818): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1846): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1853): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1919): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1939): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1950): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1977): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(1984): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2084): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2152): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2182): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2185): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2215): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2216): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2236): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2237): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2271): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2272): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2305): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2344): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2354): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2254): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2303): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2328): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2564): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2806): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(2807): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(2851): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2852): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2881): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2914): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2923): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2936): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2937): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(2938): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3000): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(3001): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
src/C/sparse.c(3131): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3149): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3159): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3163): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3169): warning C4244: 'return': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3197): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3219): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3283): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3457): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3458): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3471): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3486): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3588): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3636): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3653): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3666): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3675): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3736): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3752): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3763): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3773): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3837): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3838): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3908): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3924): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3937): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(3948): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4025): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4039): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4049): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4061): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4101): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4346): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4367): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4429): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/C/sparse.c(4436): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/lib /LIBPATH:c:\users\paseckat\spo_apiapp\env\libsles (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\lib.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\lib.0.17763.0\um\x64" m.lib lapack.lib blas.lib /EXPORT:PyInit_base build\temp.win-amd64-3.8\Release\src/C/base.obj build\temp.win-amd64-3.8\Release\src/C/dense.obj build\temp.win-amd64-3.8\Release\src/C/sparse.obj /OUT:build\lib.win-amd64-3.8\cvxopt\base.cp38-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.8\Release\src/C\base.cp38-win_amd64.lib
LINK : fatal error LNK1181: cannot open input file 'm.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paseckat\spo_apiapp\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"'; __file__='"'"'C:\Temp\pip-req-build-cu6ofxeh\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Temp\pip-record-pxi98yoc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paseckat\spo_apiapp\env\include\site\python3.8\cvxopt' Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
不确定这到底是什么意思:
LINK : fatal error LNK1181: cannot open input file 'm.lib' error: command 'C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\link.exe' failed with exit status 118
有人能帮忙或以前看过吗?
根据你提供的信息,我在python3.8使用pip安装“cvxopt
”时,遇到了和你一样的情况。
原因:“cvxopt
”安装依赖于“wheel
”,但“wheel
”不支持[=39= .8 版本.
在 CVXOPT 文档中:“Windows 的轮子:可用于 Python 2.7、3.5、3.6 和 3.7(仅限 64 位)”
解决方法:
当我使用来自 python3.7 的 pip 安装“cvxpot
”时:
另外,在VSCode的conda环境下也可以使用“conda install cvxpot
”安装,前提是使用的python也是合格的如Python3.7.
参考:CVXOPT.
我需要手动安装库。
- 我检查了我的 python 版本:在命令行中:
python --version
(我的版本是3.8.6) - 我更新了
numpy
到最新版本:1.19.2
- 从命令行获取 numpy 版本:
python -c "import numpy; print(numpy.version.version)"
pip install numpy --upgrade
1.19.2
: 这是numpy版本cp38
:这是Python版本,如果你有不同的版本,寻找你的numpy+mkl
的其他版本
cp38
:这是Python版本
- 手动安装:首先要安装
numpy+mkl
- cd <文件路径>
python -m pip install numpy-1.19.2+mkl-cp38-cp38-win32.whl
python -m pip install cvxopt-1.2.5-cp38-cp38-win32.whl