安装 PyPortfolioOps 时出错 - qdldl_types - vscode - python
我在 VSCode 上 pip install PyPortfolioOps 时遇到错误
我已经从 VisualBuildTools 安装了 C++ 组件,重新安装了 python 和 vscode
Using legacy 'setup.py install' for qdldl, since package 'wheel' is not installed.
Installing collected packages: qdldl, scs, osqp, ecos, cvxpy, PyPortfolioOpt
Running setup.py install for qdldl ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl'
cwd: C:\Users\A.Emad\AppData\Local\Temp\pip-install-0mgub_9p\qdldl_6410923930ec4b9f9c018969d6cacaf3\
Complete output (31 lines):
running install
C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "C:/Users/A.Emad/AppData/Local/Temp/pip-install-0mgub_9p/qdldl_6410923930ec4b9f9c018969d6cacaf3/c/build/CMakeFiles/CMakeOutput.log". The system cannot find the file specified
CMake Error: Generator: execution of make failed. Make command was: MSBuild.exe qdldlamd.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=14.0 /v:m &&
building 'qdldl' extension
creating build
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic -Ic\qdldl\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpcpp\qdldl.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp\qdldl.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
qdldl.cpp
c\qdldl/include/qdldl.h(5): fatal error C1083: Cannot open include file: 'qdldl_types.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe'
failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl' Check the logs for full command output.
我也无法安装 osqp==0.6.1 cvxpy
你能帮忙吗
I got an error in pip install PyPortfolioOps on VSCode
I have installed C++ components from VisualBuildTools, re-installed python and vscode
Using legacy 'setup.py install' for qdldl, since package 'wheel' is not installed.
Installing collected packages: qdldl, scs, osqp, ecos, cvxpy, PyPortfolioOpt
Running setup.py install for qdldl ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl'
cwd: C:\Users\A.Emad\AppData\Local\Temp\pip-install-0mgub_9p\qdldl_6410923930ec4b9f9c018969d6cacaf3\
Complete output (31 lines):
running install
C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "C:/Users/A.Emad/AppData/Local/Temp/pip-install-0mgub_9p/qdldl_6410923930ec4b9f9c018969d6cacaf3/c/build/CMakeFiles/CMakeOutput.log". The system cannot find the file specified
CMake Error: Generator: execution of make failed. Make command was: MSBuild.exe qdldlamd.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=14.0 /v:m &&
building 'qdldl' extension
creating build
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic -Ic\qdldl\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpcpp\qdldl.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp\qdldl.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
qdldl.cpp
c\qdldl/include/qdldl.h(5): fatal error C1083: Cannot open include file: 'qdldl_types.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe'
failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl' Check the logs for full command output.
I am also cannot install
osqp==0.6.1
cvxpy
Can you please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来
qdldl
不支持python3.10。你能切换到另一个Python版本吗?如python3.9、python3.7。It looks like the
qdldl
does not support python3.10. Could you switch to another python version? Such as python3.9, python3.7.