I ran pip install pyaudio in my terminal and got this error:
Command "/home/oliver/anaconda3/bin/python -u -c "import setuptools,
tokenize;file='/tmp/pip-build-ub9alt7s/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 /tmp/pip-e9_md34a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ub9alt7s/pyaudio/
So I ran sudo apt-install python-pyaudio python3-pyaudio
which seemed to work.
Then in jupyter:
import pyaudio
error:
ModuleNotFoundError: No module named 'pyaudio'
Can anyone help me work out this problem? I am not familiar with Ubuntu and it's commands paths etc as I've only been using it a few months.
If you need more information, let me know what, and how. Thanks
Check in the documentation of pyaudio if it is compatible with your python version
Some modules which are not compatible may be installed without issues, yet still won't work when trying to access them
i faced the same issue, and my solution was ...
python3 playmusic.py
I didn't use the preinstalled MAC's python.
if you are using windows then these command on the terminal:
pip install pipwin
pipwin install pyaudio
Related
I've installed Python 3.6.4 on Windows 8.1 64-bit.
I have it on system environment variables path as:
C:\Users\myuser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6
The command python works in any location with command line so the path works.
Here's the problem:
As I type pip install pymssql in Powershell I get the following error message:
Command "c:\users\myuser\appdata\local\programs\python\python36\python.exe -u -c
"import setuptools, tokenize;__file__=
'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-build-20pjis7d\\pymssql\\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\myuser\AppData\Local\Temp\pip-myeuf_lm-record\install-record.txt
--single-version-externally-managed --compile"
failed with error code 1 in C:\Users\myuser\AppData\Local\Temp\pip-build-20pjis7d\pymssql\
Can't find anything with that error message with Google search.
Any ideas what might be the cause of this?
Best practice is to use virtualenv rather than installing into your global environment. virtualenv will also automatically pull in the latest setuptools.
pip install virtualenv
virutalenv my_venv
source my_venv/bin/activate
pip install pymysql
Also make sure that you meet the installation requirements outlined here: http://pymysql.readthedocs.io/en/latest/user/installation.html
You may need to install MySQL server or MariaDB
With Mac 10.13.2,PyCharm 2017.3(community edition),Python 3.6.4:
I've been searching high and low but with no luck as whatever I tried didn't work.I have installed Python 3.6 and PyCharm with a success,but it was driving me crazy when I installed the moduletime,PyBluezand openpyxl in the PyCharm.
Can't install time module The answer to the time package is that The time module is part of Python's standard library. It's installed along with the rest of Python, and you don't need to (nor can you!) install it with pip.
The error warning info when I installed the PyBluez module is always the same as follows:
PermissionError: [Errno 13] Permission denied:
'/Users/ringo/Library/Caches/pip/wheels/e7/40/9d/b772a3cf2ca121e87a06eabe9483271816581dec7c772272d3'
When it occurred,I changed to install it in the terminal app with the command sudo pip3 install PyBluez
The error info:
Failed building wheel for PyBluez
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import
setuptools,
tokenize;file='/private/tmp/pip-build-umoukn9i/PyBluez/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-53lcxusy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-umoukn9i/PyBluez/
Install openpyxl:
After I installed openpyxl in the terminal app with sudo pip3 install openpyxl,I re-open a PyCharm project,but the module isn't in the packege list.When I import openpyxl and run the project, the info ModuleNotFoundError: No module named 'openpyxl'occurs.
If I install it with PyCharm,the error message is the same as that when install PyBluez
How to solve the issues? It requires me to swipe before I can continue so it slows me down... I will be really grateful if you could share some right method that I should look into. Thanks.
Add further infomation:
Cannot import Bluetooth in Python 3 (OSX)With this question asked by Carl Bratt,I found the answer:
This is the closed OS X import issue #108 on GitHub:
http://github.com/karulis/pybluez/issues/108
It's actually quite an old issue.
One thing the author suggested you might do is remove your current
installation and install the GitHub repo using pip:
git clone https://github.com/karulis/pybluez.git
pip install -e pybluez
Another command you can use:
pip3 install --upgrade git+https://github.com/rgov/pybluez.git#egg=pybluez
try to install anaconda3 instead of python itself
https://www.anaconda.com/download/#macos
I'm using anaconda for python
I'm a begginer with Python since I've never used it seriously but just to do some simple tasks. Yesterday I decided that I'd give it a more serious try and I made a simple console-application which would intarface with MySQL. I used mysql.connector module, and everythiing worked fine. Then I thought I could have given it a GUI, and I installed Tkinter since it was the most used on online tutorials. When I tried to run again my appicatio Python would tell me
ImportError: No module named mysql.connector
Which was quite strange since I used it till 10 minutes before, but ok, installing Tkinter may have messed something up, and I tried to reinstall mysql.connector.
I then remembered why I dind't really used Python: pip doesn't work for me. Everytime I try to install something with it, it gives me this error:
Command "/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-xg6au4u3/mysql-connector/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-syqhbsu8-record/install-record.txt --single-version-externally-managed --compile --user" failed with error code 1 in /private/tmp/pip-build-xg6au4u3/mysql-connector
Does anyone know how to solve this? Till now I've tried to:
Use pip3
Upgrade wheel and pip
Use a virtualenv or option --user with pip
Uninstall and reinstall Python
More information about the system I'm using:
macOs Sierra 10.12.4
Python2.7.13 (I also have python3.4.2)
pip 9.0.1
easy_install 36.0.1
I'm trying to install matplotlib on a raspberry pi with a clean installation of Raspbian Jessie (4.4 at time of writing). I am trying to install matplotlib for Python 2.7.
I keep getting the following error:
command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-HPuMoo/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l3s1dW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-HPuMoo/matplotlib
Storing debug log for failure in /home/pi/.pip/pip.log
to complicate things... this doesn't happen when I install other packages (just installed virtualenv without issue) but it DOES happen when I try to upgrade numpy.
In addition, this error occurs when working on the main distribution of Python (/usr/bin/python) or on a virtual environment (/home/pi/Envs/test/bin/python). I am, then, using pip 1.5.6 on the main distribution and 9.0.1 on the virtualenv. both fail. :(
Not sure why I'm having problems with this... considering how widely used matplotlib is (and how loaded with python packages Jessie is), you'd think there would be no issue. hm.
Per this answer by Peter Brittain and Anshuman Chhabra, installing the libpulse-dev and python-dev libraries should solve your problem. As shown on the Debian Packages references, the file lists of these libraries include the required files.
I'm trying to install scipy module in python using pip...it is showing following error..
Command "c:\users\sony\appdata\local\programs\python\python35-32\python.exe
-u -c "import setuptools,
tokenize;__file__='C:\\Users\\sony\\AppData\\Local\\Temp\\pip-build-
vmyvqdgv\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --
record C:\Users\sony\AppData\Local\Temp\pip-mf_0tla_-record\install-
record.txt --single-version-externally-managed --compile" failed with error
code 1 in C:\Users\sony\AppData\Local\Temp\pip-build-vmyvqdgv\scipy\
and when I tried it using easy_install, it showed:
error: no lapack/blas resources found
Any solutions please...
First install Numpy+MKL by downloading wheel from here.
Go to your .whl file location and type pip install <filename>
Now download SciPy from here.
Repeat step 2.
Note: Upgrade pip first by pip install --upgrade pip
Instead of installing scipy separately install anaconda(windows setup available) which comes with scipy numpy pandas and other useful python modules. https://www.continuum.io/downloads This will ease your future tasks as well when install other required modules as it creates a separate environment