How to install pyaudio? pip Install pyaudio, Giving error - python

pip install pyaudio
Giving error,
ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"'; file='"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-q8jvhxle\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.
Regards,
Neha

I had the same problem. you should install pyaudio offline.
First, download the whl file from here then install it.
pip install <downloaded file here>
In my case:
pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
Windows wheels are the most popular packages for nearly all modern Python versions, including the latest PyAudio.
please attention, you should download the version is capable with your system. If you got error like this:
ERROR: PyAudio-0.2.11-cp39-cp39-win32.whl is not a supported wheel on this platform.
try another file until installing successfully.
PyAudio
Includes ASIO, DS, WMME, WASAPI, WDMKS support.
PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
PyAudio‑0.2.11‑cp39‑cp39‑win32.whl
PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
PyAudio‑0.2.11‑cp38‑cp38‑win32.whl
PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl #this version worked for me
PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win_amd64.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win32.whl
...
Check out this answer too.

Go to website and download the version of pyaudio as per your Python version from here.
Browse the directory where the file is downloaded.
Open command prompt there
Type command pip install <filename.extension> in my case pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
It will install
Comment if facing issues in above process.

your python version is 3.7 or obove Try
pip install pipwin
pipwin install pyaudio

Related

installing skimage with pip3 fails

I am trying to pip install the package "skimage" on my Ubuntu VM to analyze structural similarity of images with scikit-image. But I always get a strange error. I already tried to install it with conda but it didn't succeeded either. Conda seems to know just "scikit-image" but not "skimage". The required packages like numpy, matplotlib, ... are installed and upgraded already.
My input:
pip3 install skimage
the error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-k9rh2ebf/skimage/pip-egg-info
cwd: /tmp/pip-install-k9rh2ebf/skimage/
Complete output (3 lines):
*** Please install the `scikit-image` package (instead of `skimage`) ***
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Thanks for your help!
You can install it using
pip install -U scikit-image or this pip install scikit-image
Look in to the documentation In order to install it you need to use the following command
pip install scikit-image
if you want to install it using the word skimage
sudo apt-get install python-skimage
Finally after a lot of trying I figured out it had to do with my virtual machine I was using. In the prebuilt Ubuntu image for VirtualBox I downloaded, something seems to be wrong with the installation paths.
Setting up a native Ubuntu (without VM) solved the problem for me. The skimage library is empty and only points to the sicikit-image library and is normally installed with the installation of scikit-image (which didn't work because of the VM).
Now on my native ubuntu everything works as it should.

How to fix ‘“ERROR: Command errored out with exit status 1:” when trying to install watchdog using pip

I am revisiting the python language and experiencing difficulty setting up my environment.
I am using
- Mac Mojave (10.14)
- python 2.7.10 (packaged with the system)
- python 3.7.4 (installed using homebrew)
- homebrew 2.1.14
- pip 19.2.3
I encounter an error message when attempting to install watchdog via pip. I believe the error is caused by pip attempting to install in python 2.7 folders (without sufficient permissions) instead of the python 3 folder
I have tried uninstalling, reinstalling and upgrading python 3
I encounter the following error message when attempting to install watchdog via pip
1 error generated.
Error compiling module, falling back to pure Python
running install_lib
creating /Library/Python/2.7/site-packages/yaml
error: could not create '/Library/Python/2.7/site-packages/yaml': Permission denied
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-install-nqmq6O/PyYAML/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-install-nqmq6O/PyYAML/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-record-g8Qjzh/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
You need to upgrade setuptools and pip. You can do that by running:
pip install -U pip setuptools
When you run pip install, exactly which pip gets used depends on several things like your PATH, shell, shell configuration, and operating system.
The best thing to do is invoke pip using <python> -m pip where <python> is the Python that you want to install the package for. For example, if you run python3 to use the Python that you want to install the package for, then run python3 -m pip.
If you're running python3 -m pip install ... and getting permission errors, then you can execute python3 -m pip install --user ..., which will install it to your user site-packages directory and available when you execute python3 under your user.

Installing cx_Freeze 5.0.2 with Python 3.5.2

I am running ubuntu 16. I have both python 2.7 and 3.5 installed. I want to install cx_freeze latest version for python3. I downloaded the package from their website but couldn't run the setup.py file as it always gave me errors. Also i have installed pip3, but it still doesn't work for me. all the answers online are for older version of cx_freeze so a fresh answer for the new version will be helpful.
I install and upgrade pip3 with:
sudo -H install --upgrade pip
then I try to install cx_freeze with:
pip3 install cx_Freeze .
then i get the following errors:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ngco46uq/cx-Freeze/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q3n3cd2r-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-ngco46uq/cx-Freeze/
also anyone can tell me any other method to do so ?
Try installing Pip3 using :
sudo apt-get install python3-pip
If you have Python 2.7, you can try alternatives like py2exe

Unable to install Google-Earth-Engine-Api in Linux subsystem for Windows

Ok, I've installed Linux subsystem in my Windows 10 and now following this tutorial to install google earth engine inside my Linux subsystem.
When I try to run following command to install GEE API, I get following error (I am getting the same error for "sudo pip install 'pyOpenSSL>=0.11'" command as well.):
sudo pip install earthengine-api
> Command "/usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-PrUuzi/cryptography/setup.py';f=get
> attr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec' ))" install
> --record /tmp/pip-3eTIvM-record/install-record.txt --single-version-externally-managed --compile" failed wit h error code 1 in /tmp/pip-build-PrUuzi/cryptography/
Then after failing this, I tried to manually download and install the GEE setup.
I copied the downloaded compressed package to folder: "C:\Users\Saurabh\AppData\Local\lxss\home\saurabh"
and then tried to do the ls -a to see if I can see the file or not. But it is not visible:
What I am doing wrong here?
As mentioned in this thread, I updated setuptools and pip to the latest versions and I am finally able to run the earthengine-api without any issue.

pip install mysql-connector-python installation error

I'm getting an error after installing MySQL Connector for Python 2.7.9 in Linux OS.
Command /usr/bin/python -c "import setuptools,
tokenize;file='/tmp/pip-build-5nxFZ_/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record /tmp/pip-qLvsiw-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-5nxFZ_/mysql-connector-python-rf
Storing debug log for failure in /home/pi/.pip/pip.log
Searched a lot about this error couldn't find a satisfactory solution, please help me to sort out this error.
Thank you. :)
use
pip install mysqlclient
as Mysql-Python and all are not supported now. install mysql in linux and install the connector to connect to local mysql
try this ,
pip install MySQL-python==1.2.5 # version specified
or
pip install MySQL-python
if you already installed required systems for python 2.7. Next, You should run this command:
sudo apt-get install python2.7-mysqldb

Categories