Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing on Windows 10 #19

Open
erelsgl opened this issue Jan 31, 2022 · 3 comments
Open

Error installing on Windows 10 #19

erelsgl opened this issue Jan 31, 2022 · 3 comments

Comments

@erelsgl
Copy link

erelsgl commented Jan 31, 2022

I get the following error when trying to install qdldl on Windows 10 (Python 3.10.2):

PS C:\Users\user> pip install qdldl
Collecting qdldl
  Using cached qdldl-0.1.5.post0.tar.gz (69 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.7 in c:\users\user\appdata\local\programs\python\python310\lib\site-packages (from qdldl) (1.22.1)
Requirement already satisfied: scipy>=0.13.2 in c:\users\user\appdata\local\programs\python\python310\lib\site-packages (from qdldl) (1.7.3)
Building wheels for collected packages: qdldl
  Building wheel for qdldl (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [52 lines of output]
      running bdist_wheel
      running build
      running build_ext
      -- Selecting Windows SDK version  to target Windows 10.0.19043.
      CMake Error at CMakeLists.txt:4 (project):
        Failed to run MSBuild command:

          MSBuild.exe

        to get the value of VCTargetsPath:

          Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
          Copyright (C) Microsoft Corporation. All rights reserved.

          Build started 31/01/2022 10:53:56.
          Project "C:\Users\user\AppData\Local\Temp\pip-install-c17wh9nq\qdldl_e61c73a0a0a546d1b29e8c207a057446\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(436,5): error MSB8020: The build tools for Visual Studio 2015 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install Visual Studio 2015 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\user\AppData\Local\Temp\pip-install-c17wh9nq\qdldl_e61c73a0a0a546d1b29e8c207a057446\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj]
          Done Building Project "C:\Users\user\AppData\Local\Temp\pip-install-c17wh9nq\qdldl_e61c73a0a0a546d1b29e8c207a057446\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

          Build FAILED.

          "C:\Users\user\AppData\Local\Temp\pip-install-c17wh9nq\qdldl_e61c73a0a0a546d1b29e8c207a057446\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->
          (PrepareForBuild target) ->
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(436,5): error MSB8020: The build tools for Visual Studio 2015 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install Visual Studio 2015 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\user\AppData\Local\Temp\pip-install-c17wh9nq\qdldl_e61c73a0a0a546d1b29e8c207a057446\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj]

              0 Warning(s)
              1 Error(s)

          Time Elapsed 00:00:00.66


        Exit code: 1



      -- Configuring incomplete, errors occurred!


It seems the process looks for Visual Studio 2015 build tools. Is it really necessary to downgrade to Visual Studio 2015 to build qdldl?

@erelsgl
Copy link
Author

erelsgl commented Jan 31, 2022

Even after installing MSBuild 2015, I get an error:

PS C:\Users\user> pip install qdldl
Collecting qdldl
  Using cached qdldl-0.1.5.post0.tar.gz (69 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.7 in c:\users\user\appdata\local\programs\python\python310\lib\site-packages (from qdldl) (1.22.1)
Requirement already satisfied: scipy>=0.13.2 in c:\users\user\appdata\local\programs\python\python310\lib\site-packages (from qdldl) (1.7.3)
Building wheels for collected packages: qdldl
  Building wheel for qdldl (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      running bdist_wheel
      running build
      running build_ext
      -- Selecting Windows SDK version  to target Windows 10.0.19043.
      CMake Error at CMakeLists.txt:4 (project):
        Failed to run MSBuild command:

          C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

        to get the value of VCTargetsPath:

          Microsoft (R) Build Engine version 14.0.23107.0
          Copyright (C) Microsoft Corporation. All rights reserved.

          Build started 31/01/2022 11:00:51.
          Project "C:\Users\user\AppData\Local\Temp\pip-install-l205k5nj\qdldl_3114a18fc4394ffd972201be245e99ec\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).
          C:\Users\user\AppData\Local\Temp\pip-install-l205k5nj\qdldl_3114a18fc4394ffd972201be245e99ec\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
          Done Building Project "C:\Users\user\AppData\Local\Temp\pip-install-l205k5nj\qdldl_3114a18fc4394ffd972201be245e99ec\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

          Build FAILED.

          "C:\Users\user\AppData\Local\Temp\pip-install-l205k5nj\qdldl_3114a18fc4394ffd972201be245e99ec\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->
            C:\Users\user\AppData\Local\Temp\pip-install-l205k5nj\qdldl_3114a18fc4394ffd972201be245e99ec\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

              0 Warning(s)
              1 Error(s)

          Time Elapsed 00:00:00.16


        Exit code: 1



      -- Configuring incomplete, errors occurred!
      See also "C:/Users/user/AppData/Local/Temp/pip-install-l205k5nj/qdldl_3114a18fc4394ffd972201be245e99ec/c/build/CMakeFiles/CMakeOutput.log".
      Microsoft (R) Build Engine version 14.0.23107.0
      Copyright (C) Microsoft Corporation. All rights reserved.

      MSBUILD : error MSB1009: Project file does not exist.
      Switch: qdldlamd.vcxproj
      building 'qdldl' extension

@erelsgl
Copy link
Author

erelsgl commented Jan 31, 2022

[The origin of this problem is probably here: https://github.com/osqp/qdldl/issues/43 ]

@RoyiAvital
Copy link

Any chance having a pre built wheel for Python 3.12 on Windows?

Currently CVXPY is failing: cvxpy/cvxpy#2269.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants