Installing PyAudio gets error: portaudio.h file not found - python-3.x

I am trying to use the SpeechRecognition library, but I get the error PyAudio not installed. I did pip3 install PyAudio, but I get the error portaudio.h file not found. I have tried everything. Downloading the .whl file, installing Visual C++ Build Tools and tried installing through pipwin. Can anyone help me?

Related

Can't install python-docx using pip

I am very new to python and programming in generall. I am following a tutorial and tried to install python-docx using pip in the cmd, but it doesn't work.
Those are the errors i see:
DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for lxml ... error
error: subprocess-exited-with-error
and
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.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Can somebody help me with that problems in a way that even a newcomer like me understands it ?
I tried it with >pip install python-docx and >pip install python-docx==0.8.11 in the cmd.
I have had the same error. Check if you have
Microsoft Visual C++ 14.0 or greater. You can download it here. https://visualstudio.microsoft.com/visual-cpp-build-tools/
That has solved the problem for me
I found a solution. It worked after installing a manual build windows x64 wheel for python 3.11. See github_lxml/lxml#356

experiencing error while installing flair

Im experiencing this error while running the command pip install flair
building 'gensim.models.word2vec_inner' 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/
----------------------------------------
ERROR: Failed building wheel for gensim
I am running this command inside a conda environment. I was able to successfully install flair before. then i uninstalled miniconda, installed it on a separate drive (on the same pc) and tried installing flair again, thus here we are.
any help on how to resolve this will be greatly appreciated.

swig.exe not found: error when try install pylinkgrammar 0.2.14

I get an error when I try to install pylinkgrammar 0.2.14, including:
Building wheel for pylinkgrammar (setup.py) error:
...
Command 'swig.exe' failed. No such file or directory
...
Failed to build pylinkgrammar
What can I do to resolve this error and get the installation done?
Install wheel using pip install wheel
Then download SWIG from here http://www.swig.org/download.html
and watch this video to know how to install it on windows https://www.youtube.com/watch?v=HDD9QqLtAws
and try to install pylinkgrammar again and it should work now
Hye
I think you need to install this :
pip3 install wheel
Try again after doing it
Download SWIG - http://www.swig.org/download.html
Add Downloaded SWIG folder to PATH
Restart Pycharm / any python coding environment
Try to Install Again the packages

pdftotext is not getting installed in windows

I am trying to extract data from an invoice. I found invoice2data will do that job. I have pip installed invoice2data.
from invoice2data import extract_data
This is getting imported.
result = extract_data('sample.pdf')
When I run the above line it is showing that
OSError: pdftotext not installed. Can be downloaded from https://poppler.freedesktop.org/
When I try pip installing pdftotext it was showing virtual c++ 14.0 is required.I installed it using build tools. Again it was showing the same error. So I downloaded the files from https://pypi.org/project/pdftotext/ and pasted the extracted files in my anaconda/Lib/sitepackages directory. Now when I try to pip install pdftotext it is showing Requirement already satisfied: pdftotext in c:\users\vicky\anaconda3\lib\site-packages (2.1.2) Now, when I try to extract data from the pdf it is again showing the same error that pdftotext is not installed. How can I overcome this error or is there any other package that will satisfy my requirement?
Thanks in advance.
Install poppler-utils before pdftotext
sudo apt-get install poppler-utils
some simple steps to do, which worked for me...
1. download and install Visual Studio with C++ Build Tools, as Microsoft Visual C++ is required.
https://visualstudio.microsoft.com/downloads/
2. Download the latest binaries of Popplers for Windows
https://blog.alivate.com.au/poppler-windows/index.html
3. Extract and copy the 'poppler' folder which is inside the folder 'include'
4. Past this 'poppler' folder inside the 'Anaconda3/include/' folder
5. Then run 'pip install pdftotext'
YOU ARE DONE!!!

ERROR in install opencv in my python 3.6.6

I HAVE PYTHON 3.6.6 INSTALLED IN MY WINDOWS 7 PLATFORM BUT WHEN I TRIED TO INSTALL OPENCV PACKAGE IT SAYS REQUIREMENT ALREADY SATISFIED AND IF I TRY TO IMPORT CV2 IT SAYS NO MODULE .I'VE TRIED ALL POSSIBLE METHODS ON INTERNET WHAT SHOULD I DO
i tried to download opencv exe from sourceforge and copying cv2.pyd file and then pasting it in site packages
i tried pip install opencv_python-4.0.1-cp37-cp37m-win_amd64.whl
but nothing works
The error message says that you are asking PIP install a version of cv2 for 64-bit Python 2.7, and that installation is failing. So the installation is not happening because it's the wrong version. That might be because you don't have Python 2.7, or because you have a 32-bit processor, or both. Navigate to Python36\Scripts and issue the command pip install opencv_python. Then pip will find the appropriate file to download, and install it.

Resources