wangzixin1940 / Python-Utilities

Python Utilities is a useful tool integration box that can help you do various things.
GNU General Public License v3.0
1 stars 0 forks source link

distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ #3

Open wangzixin1940 opened 1 month ago

wangzixin1940 commented 1 month ago

An error occurred while running this command: (Windows)

pip install vosk

It like this:

Collecting cffi>=1.0 (from vosk)
  Using cached cffi-1.16.0.tar.gz (512 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      Traceback (most recent call last):
        File "C:\Users\User-Name\AppData\Roaming\Python\Python313\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
          ~~~~^^
----------------------------------------------------------------------------------------------------------------------------------------
        File "C:\Users\User-Name\AppData\Local\Temp\pip-build-env-wqoy3kpb\overlay\Lib\site-packages\setuptools\msvc.py", line 189, in _msvc14_get_vc_env
          raise distutils.errors.DistutilsPlatformError("Unable to find vcvarsall.bat")
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

To fix this bug:

  1. Download and Microsoft C++ Build Tools
  2. Open the downloaded EXE file.
  3. Press the "Continue" button. image
  4. Wait for the program to be ready. 屏幕截图 2024-07-12 073418
  5. Press the "Install" button and wait.
  6. Restart your system.
  7. Enjoy!
wangzixin1940 commented 1 month ago

This package is a bit large and requires approximately 6GiB of available disk space.