sdaqo / anipy-cli

Little tool in python to watch and download anime from the terminal (the better way to watch anime). Also applicable as an API
https://sdaqo.github.io/anipy-cli
GNU General Public License v3.0
272 stars 42 forks source link

pip installation error #209

Open someonecantcode opened 4 days ago

someonecantcode commented 4 days ago

Describe the bug When installing anipy-cli through pip, it errors out when building levenshtein.

To Reproduce Steps to reproduce the behavior:

  1. Install python
  2. python.exe -m pip install --upgrade pip
  3. pip install anipy-cli
  4. See error

    Building wheel for levenshtein (pyproject.toml) ... error
    error: subprocess-exited-with-error
    
    × Building wheel for levenshtein (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [473 lines of output]

Expected behavior Should fully install without failure

Info full output message after pip install anipy-cli

Collecting anipy-cli
  Using cached anipy_cli-3.2.3-py3-none-any.whl.metadata (3.5 kB)
Collecting anipy-api<4.0.0,>=3.2.3 (from anipy-cli)
  Using cached anipy_api-3.2.3-py3-none-any.whl.metadata (1.5 kB)
Collecting appdirs<2.0.0,>=1.4.4 (from anipy-cli)
  Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting inquirerpy<0.4.0,>=0.3.4 (from anipy-cli)
  Using cached InquirerPy-0.3.4-py3-none-any.whl.metadata (8.1 kB)
Collecting pypresence<5.0.0,>=4.3.0 (from anipy-cli)
  Using cached pypresence-4.3.0-py2.py3-none-any.whl.metadata (4.0 kB)
Collecting pyyaml<7.0.0,>=6.0.1 (from anipy-cli)
  Using cached PyYAML-6.0.2-cp313-cp313-win_amd64.whl.metadata (2.1 kB)
Collecting yaspin<4.0.0,>=3.0.2 (from anipy-cli)
  Using cached yaspin-3.1.0-py3-none-any.whl.metadata (14 kB)
Collecting beautifulsoup4<5.0.0,>=4.12.3 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting dataclasses-json<0.7.0,>=0.6.4 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached dataclasses_json-0.6.7-py3-none-any.whl.metadata (25 kB)
Collecting levenshtein<0.26.0,>=0.25.1 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached Levenshtein-0.25.1.tar.gz (149 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting m3u8<5.0.0,>=4.1.0 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached m3u8-4.1.0-py3-none-any.whl.metadata (15 kB)
Collecting pycryptodomex<4.0.0,>=3.20.0 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached pycryptodomex-3.21.0-cp36-abi3-win_amd64.whl.metadata (3.4 kB)
Collecting python-ffmpeg<3.0.0,>=2.0.11 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached python_ffmpeg-2.0.12-py3-none-any.whl.metadata (3.2 kB)
Collecting python-mpv<2.0.0,>=1.0.6 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached python_mpv-1.0.7-py3-none-any.whl.metadata (15 kB)
Collecting requests<3.0.0,>=2.32.0 (from anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting pfzy<0.4.0,>=0.3.1 (from inquirerpy<0.4.0,>=0.3.4->anipy-cli)
  Using cached pfzy-0.3.4-py3-none-any.whl.metadata (4.9 kB)
Collecting prompt-toolkit<4.0.0,>=3.0.1 (from inquirerpy<0.4.0,>=0.3.4->anipy-cli)
  Using cached prompt_toolkit-3.0.48-py3-none-any.whl.metadata (6.4 kB)
Collecting termcolor<2.4.0,>=2.2.0 (from yaspin<4.0.0,>=3.0.2->anipy-cli)
  Using cached termcolor-2.3.0-py3-none-any.whl.metadata (5.3 kB)
Collecting soupsieve>1.2 (from beautifulsoup4<5.0.0,>=4.12.3->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached soupsieve-2.6-py3-none-any.whl.metadata (4.6 kB)
Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7.0,>=0.6.4->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached marshmallow-3.23.1-py3-none-any.whl.metadata (7.5 kB)
Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.7.0,>=0.6.4->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)
Collecting rapidfuzz<4.0.0,>=3.8.0 (from levenshtein<0.26.0,>=0.25.1->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached rapidfuzz-3.10.1-cp313-cp313-win_amd64.whl.metadata (11 kB)
Collecting wcwidth (from prompt-toolkit<4.0.0,>=3.0.1->inquirerpy<0.4.0,>=0.3.4->anipy-cli)
  Using cached wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB)
Collecting pyee (from python-ffmpeg<3.0.0,>=2.0.11->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached pyee-12.1.1-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions (from python-ffmpeg<3.0.0,>=2.0.11->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting charset-normalizer<4,>=2 (from requests<3.0.0,>=2.32.0->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests<3.0.0,>=2.32.0->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=2.32.0->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.32.0->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
Collecting packaging>=17.0 (from marshmallow<4.0.0,>=3.18.0->dataclasses-json<0.7.0,>=0.6.4->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7.0,>=0.6.4->anipy-api<4.0.0,>=3.2.3->anipy-cli)
  Using cached mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Using cached anipy_cli-3.2.3-py3-none-any.whl (37 kB)
Using cached anipy_api-3.2.3-py3-none-any.whl (34 kB)
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Using cached InquirerPy-0.3.4-py3-none-any.whl (67 kB)
Using cached pypresence-4.3.0-py2.py3-none-any.whl (11 kB)
Using cached PyYAML-6.0.2-cp313-cp313-win_amd64.whl (156 kB)
Using cached yaspin-3.1.0-py3-none-any.whl (18 kB)
Using cached beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)
Using cached dataclasses_json-0.6.7-py3-none-any.whl (28 kB)
Using cached m3u8-4.1.0-py3-none-any.whl (25 kB)
Using cached pfzy-0.3.4-py3-none-any.whl (8.5 kB)
Using cached prompt_toolkit-3.0.48-py3-none-any.whl (386 kB)
Using cached pycryptodomex-3.21.0-cp36-abi3-win_amd64.whl (1.8 MB)
Using cached python_ffmpeg-2.0.12-py3-none-any.whl (14 kB)
Using cached python_mpv-1.0.7-py3-none-any.whl (45 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Using cached termcolor-2.3.0-py3-none-any.whl (6.9 kB)
Using cached certifi-2024.8.30-py3-none-any.whl (167 kB)
Using cached charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl (102 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached marshmallow-3.23.1-py3-none-any.whl (49 kB)
Using cached rapidfuzz-3.10.1-cp313-cp313-win_amd64.whl (1.6 MB)
Using cached soupsieve-2.6-py3-none-any.whl (36 kB)
Using cached typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached urllib3-2.2.3-py3-none-any.whl (126 kB)
Using cached pyee-12.1.1-py3-none-any.whl (15 kB)
Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Using cached packaging-24.2-py3-none-any.whl (65 kB)
Building wheels for collected packages: levenshtein
  Building wheel for levenshtein (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for levenshtein (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [473 lines of output]

      --------------------------------------------------------------------------------
      -- Trying 'Ninja (Visual Studio 17 2022 x64 v144)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

      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!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja (Visual Studio 17 2022 x64 v144)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Visual Studio 17 2022 x64 v144' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

          Visual Studio 17 2022

        could not find any instance of Visual Studio.

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Visual Studio 17 2022 x64 v144' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

      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!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Visual Studio 17 2022 x64 v143' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

          Visual Studio 17 2022

        could not find any instance of Visual Studio.

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Visual Studio 17 2022 x64 v143' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Ninja (Visual Studio 16 2019 x64 v142)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

      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!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja (Visual Studio 16 2019 x64 v142)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Visual Studio 16 2019 x64 v142' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

          Visual Studio 16 2019

        could not find any instance of Visual Studio.

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Visual Studio 16 2019 x64 v142' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Ninja (Visual Studio 15 2017 x64 v141)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

      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!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja (Visual Studio 15 2017 x64 v141)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'Visual Studio 15 2017 x64 v141' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

          Visual Studio 15 2017

        could not find any instance of Visual Studio.

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Visual Studio 15 2017 x64 v141' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 17 2022 x64 v144)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

         'nmake' '-?'

        failed with:

         no such file or directory

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 17 2022 x64 v144)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 17 2022 x64 v143)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

         'nmake' '-?'

        failed with:

         no such file or directory

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 17 2022 x64 v143)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 16 2019 x64 v142)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

         'nmake' '-?'

        failed with:

         no such file or directory

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 16 2019 x64 v142)' generator - failure
      --------------------------------------------------------------------------------

      --------------------------------------------------------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 15 2017 x64 v141)' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

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

         'nmake' '-?'

        failed with:

         no such file or directory

      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'NMake Makefiles (Visual Studio 15 2017 x64 v141)' generator - failure
      --------------------------------------------------------------------------------

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

                      Building windows wheels requires Microsoft Visual Studio.
                  Get it from:
      n
                   https://visualstudio.microsoft.com/vs/

                      ********************************************************************************
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for levenshtein
Failed to build levenshtein
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (levenshtein)

Platform

Additional context Was working a like 2-3 weeks ago. Devices that have anipy-cli can still use it still. It seems that only the installation process has been bugged out recently.

someonecantcode commented 4 days ago

I also tried installing through pipx and source and came back with this:

pip failed to build package:
    levenshtein

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    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.
    no such file or directory
    ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (levenshtein)

or the error from my previous message

sdaqo commented 18 hours ago

So I don't actually have any windows installation currently to test, but you can try to install the vc++ redistributables, this should install the necessary tools to build levenshtein: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170