I want to make a speech recognition program using SpeechRecognition, which needs PyAudio to work.
I tried installing it with pip, but it says that portaudio.h is missing. So I went on PyPI and downloaded a .whl file from there (https://pypi.org/project/PyAudio/#files). But no matter what file with what version or what platform I download, pip just keeps saying that the wheel is not supported.
First try:
ERROR: PyAudio-0.2.11-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
Second try:
ERROR: PyAudio-0.2.11-cp36-cp36m-win32.whl is not a supported wheel on this platform.
Third try:
ERROR: PyAudio-0.2.11-cp35-cp35m-win32.whl is not a supported wheel on this platform.
There's also someone else who posted about the same problem (PyAudio Wheel is Unsupported?), but didn't get any answers, that's why I posted my own.
PS. I checked my architecture, it's a Win32.
There are some wheels built by a third party here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
I finally found a solution. I used a tool named pipwin, it's like pip but the difference is that it installs all the necessary dependencies. It can easily be installed so :
pip install pipwin
And then :
pipwin install pyaudio
Related
I was installing firebase-admin using pip on my raspberry pi 3b+ using the following command:
pip3 install firebase-admin
However it always ends with an error saying "Error building wheel for cryptography"
Here is the full error message:
/tmp/pip-build-env-k7qo7p54/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in packages.
!!
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
but it is not listed in the `packages` configuration of setuptools.
'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
because it may contain data files, but this behavior is likely to change
in future versions of setuptools (and therefore is considered deprecated).
Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
the `packages` configuration field or the proper discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" and "data files" on setuptools
documentation page.
!!
check.warn(importable)
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust
Python: 3.7.3
platform: Linux-5.10.103-v7+-armv7l-with-debian-10.13
pip: n/a
setuptools: 67.0.0
setuptools_rust: 1.5.2
rustc: n/a
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.48.0.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
I have tried different commands like:
pip3 install firebase-admin
or
python -m pip install firebase-admin
I have upgraded pip and tried again, but still it didn't work
I faced a similar problem long time ago and solved by installing openssl. Tried it this time, it didn't work
Also tried installing rust compiler and using it but it didn't work
I am using Raspbian OS Buster on my Raspberry Pi 3
I have tried fresh installs of the OS
Still the same problem occurs
I'm trying to install the package spectral-cube from the astropy project using pip (22.0.4). I get a long error which ends with this:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for casa-formats-io.
Failed to build casa-formats-io.
ERROR: Could not build wheels for casa-formats-io, which is required to install pyproject.toml-based projects
Even after downloading casa-formats-io from their github I still get this error.
I've also tried installing this using conda, but the error is the same.
I'm using MacOS 12.3. But I had the problem with older versions.
I'm kind of confused as to what I can do.
Thanks for the help!
I was able to fix my own problem. The error appeared because the package I was trying to download wasn't available/compatible with the newest python version (3.10). So, I simply uninstalled Python and downloaded an older version (3.8).
Thanks anyways :)
I have recently installed NEST on my MAC. I have to install the Brain Scaffold Builder. I followed the instructions and wrote bsb==3.6.0b6 and I received the following error message
Using cached bsb-3.6.0b6-py3-none-any.whl (189 kB)
ERROR: Could not find a version that satisfies the requirement rtree-linux==0.9.4 (from bsb)
ERROR: No matching distribution found for rtree-linux==0.9.4
Could you please help me to fix it?
Thank you very much in advance for your help.
The rtree package did not come packaged with wheels before version 0.9.6 (see PR#163) and the BSB instead published it's own version of the wheels under the name rtree-linux as it only contained Linux wheels and later Windows wheels. Mac wheels had never been available up until PR#163 a month ago or so.
You can resolve this issue by either cloning the repository and adapting setup.py to install rtree>=0.9.7 or by asking the maintainer (disclaimer: me) to do so; I have done so and you should be able to install the BSB with version 3.6.1 (pip install bsb) as of now on Mac without special efforts and it will use the rtree==0.9.7 Mac wheels.
I try to install pyaudio on windows using pip from a wheel package as follow:
pip install PyAudio-0.2.11-cp38-cp38m-win_amd64.whl
unfortunately it raise an error as presented below. The error message tells that my pyaudio wheel unable to be founded.
WARNING: Requirement 'PyAudio‑0.2.11‑cp38‑cp38m‑win_amd64.whl' looks like a filename, but the file
does not exist
ERROR: PyAudio‑0.2.11‑cp38‑cp38m‑win_amd64.whl is not a valid wheel filename.
What should I do to solve this issue and install pyaudio correctly ?
The error message was raised due to pip unable to locate the wheel file. Try to specify a full path such as:
pip install D:/../<file_name>.whl
or move your wheel file to the same directory as your pip.
I want to install PySide using PIP package manager. But it get this error message saying it didn't find nmake. This is no surprise because I do not have MSVC installed nor do I intend to.
Installing collected packages: pyside
Running setup.py install for pyside
Removing c:\users\cnyffele\appdata\local\temp\pip_build_cnyffele\pyside\pyside_package
Python architecture is 32bit
nmake not found. Trying to initialize the MSVC env...
Searching MSVC compiler version 9.0
error: Failed to find the MSVC compiler version 9.0 on your system.
However the setup.py program could simply run make:
C:\Users\cnyffele>where make
C:\MinGW32-xy\bin\make.exe
C:\Users\cnyffele>where mingw32-make
C:\MinGW32-xy\bin\mingw32-make.exe
But for some reason, it insists that if the platform is "win32" it should use msvc without trying anything else. It does, however, accept command-line options: I could specify "make-spec" to be "mingw" (see below).
From https://github.com/PySide/pyside-setup/blob/master/setup.py
OPTION_MAKESPEC = option_value("make-spec")
...
if sys.platform == "win32":
if OPTION_MAKESPEC is None:
OPTION_MAKESPEC = "msvc"
if not OPTION_MAKESPEC in ["msvc", "mingw"]:
print("Invalid option --make-spec. Available values are %s" % (["msvc", "mingw"]))
sys.exit(1)
How can I make setyp.py use the correct make when installing with PIP? Is there a way to have PIP provide command-line options to setup.py when it runs it? If this is not possible, how can I run setup.py manually after PIP downloaded it?
PIP allows passing options to setup via the options '--global-option' and '--install-option' as described in the pip reference guide.
The solution is:
pip install --global-option="--make-spec=mingw" PySide
Some additional information:
That prior to installing PySide using pip, you have to install cmake and Qt 4.8.
Build errors prevented me from downloading and installing PySide directly via pip. I needed to download the wheel binary packages from pypi.python.org.
Using a pre-downloaded .whl package, assuming the package is located in the current working directory:
pip install --global-option="--make-spec=mingw" PySide-1.2.4-cp27-none-win32.whl