matthewfeickert-talks / talk-urssi-summer-school-2024

Talk given at as part of July 2024 URSSI Summer School on Research Software and Open Science
https://matthewfeickert-talks.github.io/talk-urssi-summer-school-2024/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error in "Packaging compiled extensions" on Windows git bash #5

Open AyaHegazy22 opened 1 month ago

AyaHegazy22 commented 1 month ago
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: scipy>=1.6.0 in c:\users\ahegazy2\appdata\local\miniconda3\envs\urssi-summer-school-2024-packaging\lib\site-packages (from rosen-cpp==0.0.1) (1.14.0)
Requirement already satisfied: numpy in c:\users\ahegazy2\appdata\local\miniconda3\envs\urssi-summer-school-2024-packaging\lib\site-packages (from rosen-cpp==0.0.1) (2.0.1)
Building wheels for collected packages: rosen-cpp
Building wheel for rosen-cpp (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for rosen-cpp (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
*** scikit-build-core 0.9.9 using CMake 3.30.1 (wheel)
*** Configuring CMake...
2024-07-29 15:14:38,296 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
loading initial cache file C:\Users\ahegazy2\AppData\Local\Temp\tmps3cpuc6w\build\CMakeInit.txt
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:3 (project):
Running

     'nmake' '-?'

    failed with:

     no such file or directory

  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for rosen-cpp
Failed to build rosen-cpp
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (rosen-cpp)
(urssi-summer-school-2024-packaging)
matthewfeickert commented 1 month ago

@AyaHegazy22 Can you also give the command that you're using after the conda environment? I know that the slides give it, but it would be useful to get the command as is from your shell history.

AyaHegazy22 commented 1 month ago

These are the commands from the shell history

python -m pip install --upgrade pip wheel
python -m pip install .
matthewfeickert commented 1 month ago

Hm. I'm able to build without errors in CI for Microsoft Windows Server 2022. I think this will be difficult to debug without seeing the state of the machine and Windows. Let's try to sit down in-person this week to debug this and see if we can make things more robust in the repo.

AyaHegazy22 commented 1 month ago

Thank you, I am around all week.

matthewfeickert commented 1 month ago

@AyaHegazy22 Can you also post your version of Windows as seen by Command Prompt/Powershell

systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"

?

matthewfeickert commented 1 month ago

FWIW, looks like this does exist elsewhere: https://github.com/scikit-build/scikit-build-core/issues/374

AyaHegazy22 commented 1 month ago

OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.19045 N/A Build 19045

matthewfeickert commented 1 month ago

To keep a running log of the discussion, it seems that nmake is not installed on Microsoft Windows 10 Enterprise. I'm not sure how nmake gets installed through Windows, but I think that should fix things.