I tried installing Pyaudio in Python but Python says it requires Portaudio binding for the installation.Help me fix this please.My platform is Windows.I am using Python 3.7.2.
I did:
1.I followed the instructions provided in the portaudio website and generated dll file using visual studio.
The portaudio directory where the compiled files are located is my Desktop.
2.Anyway I have installed pyaudio using a setup(exe) file which i found somewhere.
So whenever i type the command "pip install pyaudio", it says the requirements are already fulfilled.
But when i use the alternative command "easy_install pyaudio",it shows an error related to portaudio.
3.And whenever I run a python file which uses pyaudio it again says binding is required.
So, I need the solution to bind Portaudio files which are in my desktop with python.
I searched everywhere for the solution but since I am a beginner, all the tutorials provided in different websites were hard to understand for me.
So please help me with a simple and descriptive solution.
Thanks in advance.
ouch, it seems like you have chosen a painful way to get pyaudio installed.
I never compile on windows, if I can't find a pre-compiled binary I will look around for a different way to get to where I want to (different library…)
you can uninstall with pip uninstall pyaudio
anyways, here's one way to get it working.
download and install a "miniconda" (google if you don't know what it is)
do conda install pyaudio in your "conda"-prompt
I did not truly check the install, but I did the conda install… and it would have installed both portaudio and pyaudio so I suppose it will work.
Related
I am trying to install pycurl module in Thonny virtual environment but without any luck..
Whatever I try, I am getting the same error message:
Please specify --curl-dir=/path/to/built/libcurl
I have previously installed this module on my Raspberry PI linux and did not have any issues whatsoever. Seems like a lot of people are having issues installing it on Windows Machine and there is still no clear solution to this.
According to the official pycurl website:
http://pycurl.io/docs/latest/install.html#windows
I should be able to install pycurl by using pip install pycurl. That is not the case unfortunately.
Also, they provide a link that is not working:
Clicking on the link returns "Forbidden".
Hoping to get some clarification. Thanks in advance.
If you want to install the current version, you need to build it from source.
You may be able to find a binary of a previous version to install through pypi.
I’m completely new to Python and I want to install the package py-webrtcvad in Windows 7, but I'm stuck at the error ImportError: No module named 'pip.utils.setuptools_build'. There is an answer to this problem in stackoverflow which seems to solve the problem for others, but it doesn't work for me.
Here’s a summary of what I’ve done and tried so far:
Installed Python 3.5 and set up the Windows path environment so
that it works from any directory.
Installed pip for Python.
Tried to install the package with python -m pip install webrtcvad,
but it failed, returning the error Unable to find vcvarsall.bat.
I found a blog that deals with the vcvarsall.bat
problem: blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat. Following the directions of that blog:
First I just installed Visual C++ Build Tools 2015 and tried installing the package straight away (without updating setuptools), but I received a lot of error messages (which I didn’t write down).
I tried reinstalling setuptools, which I did following the directions in https://pypi.python.org/pypi/setuptools: I removed the version of setuptools that came with my Python installation (v20), and installed the latest version (v30). This time I got a different error message when trying to install py-webrtcvad: ImportError: No module named 'pip.utils.setuptools_build'.
Asked for assistance in the Python official chat. They made three
suggestions:
Updating pip with python -m pip install --upgrade pip. Didn’t
work. Again, the error ImportError: No module named 'pip.utils.setuptools_build'.
Reinstalling Visual C++ Build Tools 2015. No difference, same error
again.
Reinstalling Python itself. The Python installer offers three
choices: Repair, modify and uninstall.
Repair: Didn’t work. Same error.
Modify: Doesn’t look like it offers useful modifications for this.
Uninstall: Uninstalled and reinstalled. Still the same error.
I’m out of ideas. Can you help me?
Note: I imagine this should be doable in Windows 7 with Python 3.5. However, if it isn't I'm open to trying anything different. For example, installing a different version of Python would be no problem at all. I could also try installing Linux if that will solve the problem.
There was a bug in version 2.0.8 of webrtcvad that caused it to use the wrong flags when compiling for Windows: it was using -DWEBRTC_POSIX instead of -DWIN32. This might have been the source of the "lot of error messages" you got during one of your early attempts.
The fixed version has been pushed to pypi as version 2.0.9. I've confirmed that pip install webrtcvad works correctly on Windows 10. I'm using a pretty fresh install of Python, so I would try it first without reinstalling setuptools.
Trying to install python-docx through pip for 'Learn to Automate the Boring Things with Python'. I am getting errors like this.
I have Googled up some solutions to this issue, but they don't seem to work for me, or I am not deploying the solution correctly.
One post on Stackoverflow said to download an lxml file made available by Christoph Golke.
I downloaded, and then tried 'pip install lxml', and basically got the same error message as the screenshot, telling me 'Unable to find vcvarsall.bat'.
Am I supposed to put this file in a certain directory, before executing that command? Any help would be appreciated.
This mean that C++ Common Tools are not installed.
To install them for Python2.7 go to Microsoft Visual C++ Compiler for Python 2.7
For python3 install Visual Studio Community 2015 and execute the following command:
SET VS90COMNTOOLS=%VS140COMNTOOLS%
so I found the answer to this issue.
So I wasn't aware that to install the lxml file, you first need to change to the directory of that file, and type in the complete name of that file. Either that, or typing the path of the lxml file directly into the cmd prompt, like:
pip install C:\Users\yourName\Downloads\lxml-3.6.4-cp35-cp35m-win32
or
cd C:\Users\yourName\Downloads
pip install lxml-3.6.4-cp35-cp35m-win32
which successfully installed the lxml file, which then led to a successful installation of the python-docx file.
Essentially, a basic knowledge of the command prompt would've helped me avoid this problem...but hope this helps for anyone else who doesn't know what to do!
I'm trying to start with OpenCV with python. I have experience c# and I have knowledge of c++. However, I feel more comfortable with python instead of c++. I installed OpenCV then python 3.4 in visual studio 2015. At the beginning I've received an error numpy, "Module couldn't be found", thankfully, I resolved it. The I got another error cv2 "Module couldn't be found" I asked an question yesterday, but I think the question has been left away. Anyways, I'm not complaining, but I still need some help please to stat with OpenCV in python.
Installing python 3.4 Successful
Installing numpy Successful
installing matpilotlib Failed
installing cv2 Failed
can anybody help me please thanks a lot.
It's very common to install Python packages through pip today (recursive acronym for pip installs packages). However, this is not that trivial under Windows.
How to install matplotlib:
Try to open a commandline and type in pip install matplotlib. If this does not work, you'll need to do some more work to get pip running. I gave a detailed answere here: Not sure how to fix this Cmd command error?.
How to install OpenCV:
The Python OpenCV DLL must be made for your version of Python and your system architecture (or, to be more specific, the architecture your Python was compiled for).
Download OpenCV for your Python version (2/3)
Try replacing the x64 version with the x86 version
There are a lot of different binaries here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv. Try to get the one exactly matching your Python version and System architecture and install it via pip (cp35 means CPython version 3.5 ect.).
If you have the OpenCV .whl file matching your system configuration, do pip install file.whl.
Hope this helps!
You can install matplotlib using pip (which is already installed on your machine - mentioned in your previous quesiton):
pip install matplotlib
more info:
http://matplotlib.org/faq/installing_faq.html
You may be better off using an package such as pythonxy as a start, e.g. from https://python-xy.github.io/ , instead of installing each single package manually.
I have recently stated a arduino project for my engineering class. I mange to get python to talk to arduino via serial communication. Now I can send data to the board, I want to be able to set up a graphical user interface GUI with GTK, so that the user and push a button in the GUI and a LED turns on. However, I am trying to install the GTK liberty and I am running into a lot of problems.
Problem:
I download GTK via pyip, when I run the set up file in the command line it says
you have to install pyobject. So i went back to pyip and download the pyobject module and run the set up file. When I run the set up file I get this error message "ERROR: Could not find pkg-config: Please check your PATH environment variable." I downloaded the pyconfig from pyip ran it and the set up ran fine. But when i went to install pyobject I keep getting this error. Can someone direct tell me how to install GTK properly or how to fix my problem.
PS I try setting my windows environment to the location of my pkg-config file.
Error from Installer
CMD error :
Help would be deeply appreciated
Thanks
Sean From Boxing Studio Games
I would suggest that you use the latest all-in-one installer for pyGTK. You can find it here.
It should automagically install all of the dependencies for pyGTK.
I believe that your problem is that you're trying to find non-Python prerequisites via pip.
You say "I download GTK via pyip", I don't know any package manager named pyip. If you mean pip, that only installs Python packages; it doesn't help get the DLLs and other files that are needed to build those Python packages. In particular, to install the Python bindings for Gtk+ and do anything useful with them, you have to have Gtk+ itself. You can get a nice installer package from the Gtk website.
Also, you have to be precise with names. If you're missing pkg-config, installing something called pyconfig isn't going to help; they have nothing to do with each other. Similarly, pip is the Python package installer; pyip is a library for dealing with raw IP packets; they have nothing to do with each other.
At any rate, the Gtk+ binaries should have all the prerequisites you need. Then pip should be able to install the Python bindings… assuming you have a compiler set up properly. But somehow, I have a feeling that you don't have one set up, and don't know how.
Fortunately, Christoph Gohlke's repo has prebuilt binary wheels for almost anything you could want in Python that's hard to build for Windows. Just download the .whl files you need from that package, and follow the instructions on the page to install them with pip.