Unable to install dlib module - python

While installing dlib module, all the subprocesses are killed and showing that legacy error.
The same error is faced when face-recognition is installed.
I tried to do this with github repositry files.But also it is not working for both of the module.
I want to know how to install successfully both the modules in python 3.11.1 version on windows 10 laptop

From https://www.geeksforgeeks.org/how-to-install-dlib-library-for-python-in-windows-10/ :
Install Cmake from https://cmake.org/download/ (Add to PATH)
Install the c++ compiler of the visual studio code community version. For that go to the visual studio code official website https://visualstudio.microsoft.com/visual-cpp-build-tools/
Then pip install cmake and dlib

Related

Setup.py error when installing dlib on Windows 10 [PYTHON]

Whenever I try to install dlib using pip install dlib or pip3 install dlib, I get the following error message error
I have already downloaded cmake and cv2, and I have also added cmake bin to the environment variables, I am not sure what else I could do to get this working. My main point downloading dlib is to be able to use the face_recognition library.
Follow the article on the https://www.geeksforgeeks.org/how-to-install-dlib-library-for-python-in-windows-10/
Install CMake from its official website and make sure choose the right version according to your system configuration.
While installing CMake select Add CMake to the system PATH to avoid any error in the next steps.
Install the c++ compiler of the visual studio code community version.
Install cmake library pip install cmake.
Install dlib library pip install dlib.

How can i install pyaudio on visual studio?

How can i install pyaudio on visual studio
I tried
pip install pyaudio
but i'm getting error
after that i downloaded pyaudio files but not able to install them
provide me a solution
Possible duplicate: I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?
There are many ways to do this, I will tell here two.
Install PyAudio using pipwin
pip install pipwin
pipwin install pyaudio
This is the simple way. If it doesn't work follow the below method.
Install PyAudio using wheel
First check your python version.
Go to this website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
Find and download the correct version of your Python wheel. Here I will choose 3.7 and 64 bit.
This would be the right wheel for me: PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
Open any terminal in the downloaded folder and install it with the help of this command.
pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
Note: Here instead of my wheel name, write the name of your wheel.
Reference: pyaudio install error windows | pyaudio error microsoft visual c++ 14.0 is required
I have successfully installed it....
just paste downloaded .whl file at C:\Users\bharat chauhan\AppData\Local\Programs\Python\Python39\Scripts & fromr here open cmd & run command pip install file name

How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?

I'm trying to install a package on Python, but Python is throwing an error on installing packages. I'm getting an error every time I tried to install pip install google-search-api.
Here is the error how can I successfully install it?
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/
I already updated that and have the latest version of 14.27 but the problem is throwing the same error.
Go to this link and download Microsoft C++ Build Tools:
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Open the installer, then follow the steps.
You might have something like this, just download it or resume.
If updating above doesn't work then you need to configure or make some updates here. You can make some updates here too by clicking "Modify".
Check that and download what you need there or you might find that you just need to update Microsoft Visual C++ as stated on the error, but I also suggest updating everything there because you might still need it on your future programs. I think those with the C++ as I've done that before and had a similar problem just like that when installing a python package for creating WorldCloud visualization.
UPDATE: December 28, 2020
You can also follow these steps here:
Select: Workloads → Desktop development with C++
Then for Individual Components, select only:
Windows 10 SDK
C++ x64/x86 build tools
You can also achieve the same automatically using the following command:
vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
Reference:
https://www.scivision.dev/python-windows-visual-c-14-required
2020 - redist/build tools for Visual C++
silent installs can be done using the following two commands :
vs_buildtools__370953915.1537938681.exe --quiet --add Microsoft.VisualStudio.Workload.VCTools
and
VC_redist.x64.exe /q /norestart
Upgrade your pip with: python -m pip install --upgrade pip
Upgrade your wheel with: pip install --upgrade wheel
Upgrade your setuptools with: pip install --upgrade setuptools
Close the terminal
Try installing the package again.
I tried everything and then finally, downgrading from python 3.10 to 3.9 is what worked. (I noticed it in this comment, but it is a bit different scenario: https://stackoverflow.com/a/70617749/17664284 )
check if no older version of Microsoft Visual C++ are installed. If so uninstall them.
I encounered the above-mentionned problem when using virtualenv. Using conda environment instead solved the problem. Conda automatically installs vs2015_runtime which compiles the wheels with no problem.
In addition to the verified answer by #ice bear, just make sure to reboot your system after downloading and installing the latest visual studio build tools. And then the error you might be getting would go!
Tried Prason's approach. Also tried the fix suggested here
conda install -c conda-forge implicit
pip install --upgrade gensim
here is my error ERROR: Could not build wheels for multidict, which is required to install pyproject.toml-based projects
download whl https://www.lfd.uci.edu/~gohlke/pythonlibs/#multidict
pip install multidict-6.0.2-py3-none-any.whl
pip install httpie

Problem importing modules in Visual Studio Code

I am working on python using the editor Visual Studio Code. The problem is that there are certain packages that are already installed on my MAC but the Visual Studio Code shows an error when I try importing the packages to my code. Few packages that show this error are: Pillow, pyserial, bs4,etc. I have downloaded the packages using the following pip command:
sudo pip install Pillow
The packages are shown on my system when I use the command:
pip freeze

How to install pyzmq python package in windows 10

When I tried to install pyzmq package in python, I always get this error message
PS C:\python37-32> pip install pyzmq
Failed building wheel for pyzmq
building 'zmq.libzmq' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visu
So I tried to fix it in two different ways:
Option 1: I downloaded Microsoft Visual C++ 14.00 --> It doesn't work
I downloaded the wheel "pyzmq-17.0.0-cp37-cp37m-win_amd64.whl" and tried to install it with the pip install comannd --> It doesn't work
Does anyone can give me an advice how I can install the package? That would be great
I try the following solution and it works for me. Solution:
Download an appropriate file from Unofficial Windows Binaries for Python Extension Packages.
For win10 as I use, just download: pyzmq-18.1.1-cp37-cp37m-win_amd64.whl
install this file from local with pip:
pip install download_directory/pyzmq-18.1.1-cp37-cp37m-win_amd64.whl
Upgrade your setup tools:
pip install --upgrade setuptools
I fixed it with this command:
pip install --upgrade pyzmq

Categories