YannickJadoul / Parselmouth

Praat in Python, the Pythonic way
https://parselmouth.readthedocs.io/
GNU General Public License v3.0
1.07k stars 116 forks source link

Installation Failing when using Visual Studio 2022 and Windows 11 #72

Closed SohamSen15 closed 2 years ago

SohamSen15 commented 2 years ago

System Information

Operating System - Windows 11 Python Version - 3.10.0 Visual Studio - Visual Studio 2022 Package Manager - PIP

Description

The problem may be due to Windows 11 or VS 2022. When I try to install the package, it gives me the following error:

Building wheels for collected packages: praat-parselmouth
  Building wheel for praat-parselmouth (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\soham\miniconda3\python.exe' 'C:\Users\soham\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\soham\AppData\Local\Temp\tmp1gyd0p55'
       cwd: C:\Users\soham\AppData\Local\Temp\pip-install-ehh6vn7e\praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e
  Complete output (343 lines):
  WARNING: '' not a valid package name; please use only .-separated package names in setup.py
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator

      Visual Studio 16 2019

    could not find any instance of Visual Studio.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Running

     'nmake' '-?'

    failed with:

     The system cannot find the file specified

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  -- The C compiler identification is unknown
  CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
    The CMAKE_C_COMPILER:

      cl

    is not a full path and was not found in the PATH.

    To use the JOM generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator

      Visual Studio 15 2017

    could not find any instance of Visual Studio.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Running

     'nmake' '-?'

    failed with:

     The system cannot find the file specified

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  -- The C compiler identification is unknown
  CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
    The CMAKE_C_COMPILER:

      cl

    is not a full path and was not found in the PATH.

    To use the JOM generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-ehh6vn7e/praat-parselmouth_8aabdbb89a704e4daaa852d44164ce2e/_cmake_test_compile/build/CMakeFiles/CMakeError.log".

  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 16 2019 x64 v141" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 16 2019 x64 v141" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  ********************************************************************************
  scikit-build could not get a working generator for your system. Aborting build.

  Building Windows wheels for requires Microsoft Visual Studio 2017 or 2019:

    https://visualstudio.microsoft.com/vs/

  ********************************************************************************
  ----------------------------------------
  ERROR: Failed building wheel for praat-parselmouth
Failed to build praat-parselmouth
ERROR: Could not build wheels for praat-parselmouth which use PEP 517 and cannot be installed directly
hokiedsp commented 2 years ago

@SohamSen15 - @YannickJadoul is out for a little while (his PC crashed) but here is something you can try building the project.

The error message 100% indicates a CMake compatibility issue with MSVC2022.

Make sure that you are using CMake v3.21 or later. Also, I recommend using Ninja builder (https://ninja-build.org/) as well. Ninja is a single-file executable, download it and add its folder to the system path.

If you are relying on pip to install cmake, update the version reqeuirement on "pyproject.toml" change: "cmake>=3.18" to "cmake>=3.21".

Hope this helps

YannickJadoul commented 2 years ago

@SohamSen15 Indeed. Sorry for the late reply, but I didn't have my own laptop for a while.

The issue is a couple of things:

Errrm, yeah, how to proceed? My intention was to get these 3.10 wheels out soonish, but I need some spare time. Hopefully the holidays will give me the spare time, and this issue will give me the motivation.

Meanwhile, one option would be to temporarily use Python 3.9, or install VS 2019's MSVC and tools. For now, unfortunately, the combination of 3.10 and VS 2022 seems to be troublesome :-/

hokiedsp commented 2 years ago

Oops, so the issue has a deeper root than I thought... Glad @YannickJadoul could chime in timely!

SohamSen15 commented 2 years ago

Okay, for the time being, I'm going to use Python 3.9 then. I don't want to be messing around with build systems right now. Hope this gets fixed in the near future. If I get time, I'll submit a PR fixing the issue.

YannickJadoul commented 2 years ago

Thanks! I'll keep this open and I'll let you know once things are working for 3.10!

SohamSen15 commented 2 years ago

Just to let you know, I tried out building the package from source with the updated CMake ( >= 3.21 ) version and it doesn't seem to work. So that's a dead end. Also, I tried it out with Python 3.9 (Still with VS2022) and got the following error:

Collecting praat-parselmouth
  Using cached praat-parselmouth-0.4.0.tar.gz (22.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting numpy>=1.7.0
  Using cached numpy-1.21.5-cp310-cp310-win_amd64.whl (14.0 MB)
Building wheels for collected packages: praat-parselmouth
  Building wheel for praat-parselmouth (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\soham\miniconda3\python.exe' 'C:\Users\soham\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\soham\AppData\Local\Temp\tmpswq483yu'
       cwd: C:\Users\soham\AppData\Local\Temp\pip-install-kxr44_mq\praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7
  Complete output (343 lines):
  WARNING: '' not a valid package name; please use only .-separated package names in setup.py
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator

      Visual Studio 16 2019

    could not find any instance of Visual Studio.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Running

     'nmake' '-?'

    failed with:

     The system cannot find the file specified

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  -- The C compiler identification is unknown
  CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
    The CMAKE_C_COMPILER:

      cl

    is not a full path and was not found in the PATH.

    To use the JOM generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator

      Visual Studio 15 2017

    could not find any instance of Visual Studio.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at CMakeLists.txt:2 (PROJECT):
    Running

     'nmake' '-?'

    failed with:

     The system cannot find the file specified

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  -- The C compiler identification is unknown
  CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
    The CMAKE_C_COMPILER:

      cl

    is not a full path and was not found in the PATH.

    To use the JOM generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.

  -- Configuring incomplete, errors occurred!
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  See also "C:/Users/soham/AppData/Local/Temp/pip-install-kxr44_mq/praat-parselmouth_4a629b6e4acd4c9abb1d0b36d2de8cd7/_cmake_test_compile/build/CMakeFiles/CMakeError.log".

  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 16 2019 x64 v141" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 16 2019 x64 v141" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 16 2019 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 16 2019 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles JOM (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------

  ********************************************************************************
  scikit-build could not get a working generator for your system. Aborting build.

  Building Windows wheels for requires Microsoft Visual Studio 2017 or 2019:

    https://visualstudio.microsoft.com/vs/

  ********************************************************************************
  ----------------------------------------
  ERROR: Failed building wheel for praat-parselmouth
Failed to build praat-parselmouth
ERROR: Could not build wheels for praat-parselmouth which use PEP 517 and cannot be installed directly

Let me know if I have to use Python 3.9 and VS2019 together because I haven't tried that out yet.

YannickJadoul commented 2 years ago

Also, I tried it out with Python 3.9 (Still with VS2022) and got the following error:

Based on the numpy-1.21.5-cp310-cp310-win_amd64.whl filename in that error, it would seem you're still trying to install/build for 3.10 (i.e., cp310)?

Let me know if I have to use Python 3.9 and VS2019 together because I haven't tried that out yet.

Nope, normally, 3.9 wheels should be pre-built on PyPI (see https://pypi.org/project/praat-parselmouth/0.4.0/#files; praat_parselmouth-0.4.0-cp39-cp39-win_amd64.whl). If you prefer Python 3.10, you could install VS2019, which should work. But for Python 3.9, that is not (should not be, at least) necessary.

hokiedsp commented 2 years ago

@YannickJadoul - Can't he build the cmake on its own to build the project? Something along the line of running 3 commands:

cmake -S . -B build
cmake --build build
cmake --install build

This removes the scikit-build from the process and you can just place the built Python package file wherever the rest of the Python project.

YannickJadoul commented 2 years ago

install won't work, I think. You'd probably have to manually install it, and it won't be neatly installed as Python package, uninstallable by pip.

It would be another solution to get Python 3.10 and VS2022 working, but if @SohamSen15 doesn't mind using 3.9 for now, that should do the job more cleanly.

SohamSen15 commented 2 years ago

Based on the numpy-1.21.5-cp310-cp310-win_amd64.whl filename in that error, it would seem you're still trying to install/build for 3.10 (i.e., cp310)?

Yup, my bad. I'm using Conda and created the environment but forgot to activate it 😕. It does work with Python 3.9. Thanks for clearing that up. I don't mind using Python 3.9 for now, but I sure would love to have access to all the latest and greatest features of 3.10. Looking forward to the fix.

YannickJadoul commented 2 years ago

Yup, my bad. I'm using Conda and created the environment but forgot to activate it confused. It does work with Python 3.9. Thanks for clearing that up. I don't mind using Python 3.9 for now, but I sure would love to have access to all the latest and greatest features of 3.10. Looking forward to the fix.

No worries. Sorry for the inconvenience with Python 3.10!

Once again, I'll let you know with a message on this issue once the 3.10 wheels are available!

SohamSen15 commented 2 years ago

Sounds good to me. Looking forward to it.

YannickJadoul commented 2 years ago

@SohamSen15, I finally managed to fix the build and get some wheels for 3.10, also on Windows.

I still want to check them, before releasing them, but if you want to use 3.10, you can already find the wheels here: https://github.com/YannickJadoul/Parselmouth/actions/runs/1748595001 To install one of these, go to the "Artifacts" at the bottom, download "wheels", and extract the praat_parselmouth-0.4.0-cp310-cp310-win_amd64.whl file from the zip. You should then be able to pip install praat_parselmouth-0.4.0-cp310-cp310-win_amd64.whl to install this wheel.

SohamSen15 commented 2 years ago

I'll use it after they're tested and released on PyPI.

YannickJadoul commented 2 years ago

I've just released Parselmouth 0.4.1, with Python 3.10 binaries for Linux, macOS, and Windows. So this should make it possible for you to easily install it :-) (If you still have an issue or an error during installation, please reopen this issue!)