Simpleaudio doesn't install: legacy-install-failure - python

I am trying to install Simpleaudio on Windows in order to use Pydub but I get a legacy-install-failure in the cmd. Here is the complete output:
C:\WINDOWS\system32>pip install simpleaudio
Collecting simpleaudio
Using cached simpleaudio-1.0.4.tar.gz (2.0 MB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for simpleaudio, since package 'wheel' is not installed.
Installing collected packages: simpleaudio
Running setup.py install for simpleaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for simpleaudio did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\simpleaudio
copying simpleaudio\__init__.py -> build\lib.win-amd64-3.9\simpleaudio
copying simpleaudio\shiny.py -> build\lib.win-amd64-3.9\simpleaudio
copying simpleaudio\functionchecks.py -> build\lib.win-amd64-3.9\simpleaudio
creating build\lib.win-amd64-3.9\simpleaudio\test_audio
copying simpleaudio\test_audio\c.wav -> build\lib.win-amd64-3.9\simpleaudio\test_audio
copying simpleaudio\test_audio\e.wav -> build\lib.win-amd64-3.9\simpleaudio\test_audio
copying simpleaudio\test_audio\g.wav -> build\lib.win-amd64-3.9\simpleaudio\test_audio
copying simpleaudio\test_audio\left_right.wav -> build\lib.win-amd64-3.9\simpleaudio\test_audio
copying simpleaudio\test_audio\notes_2_16_44.wav -> build\lib.win-amd64-3.9\simpleaudio\test_audio
running build_ext
building 'simpleaudio._simpleaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> simpleaudio
note: This is an issue with the package mentioned above, not pip.
Am I supposed to download and install 'Build Tools for Visual Studio'? If so, is there a specific place it should be installed in?
Thank you.

Related

building wheels for various packages not working

I receive various error when trying to install magenta with pip
i get an error for building wheels for numba, llvmlite and python-rtmidi
example for numba:
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiconstants.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiutil.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\release.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\__init__.py -> build\lib.win-amd64-cpython-39\rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
error: 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: Failed building wheel for python-rtmidi
Running setup.py clean for python-rtmidi
Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
running bdist_wheel
C:\Users\Dell\anaconda3\python.exe C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py
-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Das System kann die angegebene Datei nicht finden
-- Configuring incomplete, errors occurred!
See also "C:/Users/Dell/AppData/Local/Temp/tmpjza6m78t/CMakeFiles/CMakeOutput.log".
CMake Error at CMakeLists.txt:3 (project):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Dell/AppData/Local/Temp/tmp0ap85972/CMakeFiles/CMakeOutput.log".
Trying generator 'Visual Studio 14 2015 Win64'
Trying generator 'Visual Studio 15 2017 Win64'
Traceback (most recent call last):
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 192, in <module>
main()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 180, in main
main_win32()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 89, in main_win32
generator = find_win32_generator()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 85, in find_win32_generator
raise RuntimeError("No compatible cmake generator installed on this machine")
RuntimeError: No compatible cmake generator installed on this machine
error: command 'C:\\Users\\Dell\\anaconda3\\python.exe' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build numba python-rtmidi llvmlite
Installing collected packages: python-rtmidi, pygtrie, mido, llvmlite, keras, flatbuffers, tensorflow-estimator, sox, scipy, protobuf, promise, numba, keras-preprocessing, importlib_resources, imageio, etils, absl-py, tf-slim, tensorflow-probability, sk-video, resampy, mir-eval, matplotlib, googleapis-common-protos, dm-sonnet, tensorflow-metadata, librosa, tensorflow-datasets, tensorboard, note-seq, tensorflow, magenta
Running setup.py install for python-rtmidi ... error
error: subprocess-exited-with-error
× Running setup.py install for python-rtmidi did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running install
C:\Users\Dell\anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiconstants.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiutil.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\release.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\__init__.py -> build\lib.win-amd64-cpython-39\rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
error: 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
what I already tried:
reinstall all 3 packages
downgrade versions of those packages
the same with cmake and wheel package
install windows sdk
test it on another device
I have no idea how to continue. Do you have a solution for this?
my python version is 3.9.13
Thank you very much!
tried to install magenta but receive errors

python 3.9 magenta not working on Windows

I receive various error when trying to install magenta with pip
i get an error for building wheels for numba, llvmlite and python-rtmidi example for numba:
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiconstants.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiutil.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\release.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\__init__.py -> build\lib.win-amd64-cpython-39\rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
error: 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: Failed building wheel for python-rtmidi
Running setup.py clean for python-rtmidi
Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
running bdist_wheel
C:\Users\Dell\anaconda3\python.exe C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py
-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Das System kann die angegebene Datei nicht finden
-- Configuring incomplete, errors occurred!
See also "C:/Users/Dell/AppData/Local/Temp/tmpjza6m78t/CMakeFiles/CMakeOutput.log".
CMake Error at CMakeLists.txt:3 (project):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Dell/AppData/Local/Temp/tmp0ap85972/CMakeFiles/CMakeOutput.log".
Trying generator 'Visual Studio 14 2015 Win64'
Trying generator 'Visual Studio 15 2017 Win64'
Traceback (most recent call last):
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 192, in <module>
main()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 180, in main
main_win32()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 89, in main_win32
generator = find_win32_generator()
File "C:\Users\Dell\AppData\Local\Temp\pip-install-f301n_gf\llvmlite_52e74a978a1540339621403e230729a1\ffi\build.py", line 85, in find_win32_generator
raise RuntimeError("No compatible cmake generator installed on this machine")
RuntimeError: No compatible cmake generator installed on this machine
error: command 'C:\\Users\\Dell\\anaconda3\\python.exe' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build numba python-rtmidi llvmlite
Installing collected packages: python-rtmidi, pygtrie, mido, llvmlite, keras, flatbuffers, tensorflow-estimator, sox, scipy, protobuf, promise, numba, keras-preprocessing, importlib_resources, imageio, etils, absl-py, tf-slim, tensorflow-probability, sk-video, resampy, mir-eval, matplotlib, googleapis-common-protos, dm-sonnet, tensorflow-metadata, librosa, tensorflow-datasets, tensorboard, note-seq, tensorflow, magenta
Running setup.py install for python-rtmidi ... error
error: subprocess-exited-with-error
× Running setup.py install for python-rtmidi did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running install
C:\Users\Dell\anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiconstants.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\midiutil.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\release.py -> build\lib.win-amd64-cpython-39\rtmidi
copying rtmidi\__init__.py -> build\lib.win-amd64-cpython-39\rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
error: 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I have no idea how to continue. Do you have a solution for this?
What we've found out is, that this issue is only appearing on windows but working on mac OS.
my python version is 3.9.13
Thank you very much!
tried to install magenta but receive errors
what I already tried and didn't work:
reinstall all 3 packages
downgrade versions of those packages
the same with cmake and wheel package
install windows sdk
test it on another device

i am getting this error while installing bpy package

Collecting bpy
Using cached bpy-2.82.1.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Skipping wheel build for bpy, due to binaries being disabled for it.
Installing collected packages: bpy
Running setup.py install for bpy ... error
error: subprocess-exited-with-error
× Running setup.py install for bpy did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/post_install.py -> build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/init.py -> build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/pre_uninstall.py -> build/lib.linux-x86_64-3.7/blenderpy
running build_ext
Preparing the build environment
Searching for compatible Blender online (this will take a while)
error: [Errno 2] No such file or directory: 'svn': 'svn'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> bpy

PyAudio not found

AttributeError: Could not find PyAudio; check installation
I tried to install pyaudio then it says:
PS E:\MU\Sem 4\JARVIS\CODE> pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' extension
error: 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

problem of installing xfoil python package

I got a problem of installing xfoil python package
Collecting xfoil
Using cached xfoil-1.1.1.tar.gz (12 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\xxx\desktop\curve\venv\lib\site-packages (from xfoil) (1.22.4)
Building wheels for collected packages: xfoil
Building wheel for xfoil (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\xfoil
copying xfoil\model.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\test.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\xfoil.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\__init__.py -> build\lib.win-amd64-cpython-310\xfoil
running build_ext
error: [WinError 2] system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xfoil
Running setup.py clean for xfoil
Failed to build xfoil
Installing collected packages: xfoil
Running setup.py install for xfoil ... error
error: subprocess-exited-with-error
× Running setup.py install for xfoil did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running install
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build an
d pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\xfoil
copying xfoil\model.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\test.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\xfoil.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\__init__.py -> build\lib.win-amd64-cpython-310\xfoil
running build_ext
error: [WinError 2] system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> xfoil
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
How can I deal with it?
Thank you very much
The problem appears to be that the build process is failing, as pip is trying to compile the source code, but it's failing because the prerequisites for this process aren't present.
To make this work, you could install the package using pre-compiled (built) packages. The package has only published built packages for Python 3.7
https://pypi.org/project/xfoil/#files
To use this, create a Python virtual environment that uses Python version 3.7.
I got this working using the Anaconda Python distribution as follows.
First, create a virtual environment using Python version 3.7
conda create -n xfoil python=3.7
pip install xfoil
Because this environment is using Python version 3.7, the built xfoil distribution will be downloaded (the wheel file .whl). The console output is shown below:
Collecting xfoil
Downloading xfoil-1.1.1-cp37-cp37m-win_amd64.whl (442 kB)
|████████████████████████████████| 442 kB 1.6 MB/s
Requirement already satisfied: numpy in c:\users\joe\miniconda3\envs\xfoil\lib\site-packages (from xfoil) (1.19.5)
Installing collected packages: xfoil
Successfully installed xfoil-1.1.1
If you want to build xfoil using a more recent Python version (you're using version 3.10) then follow the build instructions on the xfoil page https://pypi.org/project/xfoil/ under "Building and Installing the Python Module"
I had the same problem, but it as been easily solved by reading the page linked by Joe (https://pypi.org/project/xfoil/).
Just download the file from the Pypi mirror, unpack and install using pip in the directory:
pip install .
My problems was most probably linked to my python version...
Thanks !

Categories

Resources