ModuleNotFoundError: No module named 'face_recognition'->pip install dlib error - python

Summary:
I am trying to run the python file which contains face_recognition. But, it is giving me ModuleNotFoundError: No module named 'face_recognition'.
I have tried the way to solve:
I looked to similar problem in StackOverflow. I got the solution to install cmake,then dlib and then face_recognition.
pip install cmake has installed the cmake module successfully.
But when I am installing dlib using pip install dlib even I tried with pip3 install dlib,still it is gving me error. The error is shown as :
enter image description here
4)When wrote pip install dlib. It is giving me
*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*
while i am using visual studio code only for development. I have already installed c++ in vs code(gcc compiler).
It is important to be solved, because:
1)Without this face_recognition module is not workin and I am not able to open the project as working file.
Feel free to ask any doubt needed to the problem. Any help will be respected.

you can try this blog to see if it works, hope this helps:
dlib installation steps
From what it looks like, its an external library that is needed by Windows OS, I have faced a similar scenario where I was asked to upgrade / use this library while installing PC games.

Related

"Cannot open include file: 'gsl/gsl_errno.h': No such file or directory" error on Widnows 10

I am trying to install a python package pyphenomd in anaconda on my Windows 10. I have installed Microsoft Visual C++ 2015 and the GNU Scientific Library (GSL) package using conda.
I then tried installing pyphenomd using in the Anaconda Prompt
pip install pyphenomd
(Not using conda install since that gives a Packages Not Found Error.)
But I keep getting the following error.
Then
Installing collected packages: pyphenomd
Running setup.py install for pyphenomd ... error
Followed by another iteration of the above error. Finally ending with this message
Based on Cannot open include file: 'gsl/gsl_errno.h': No such file or directory message I am assuming the error is Visual C++ is not able to access the header files for gsl. I then reinstalled the gsl package from conda but that didn't help. So then I installed GSL using vcpkg following the procedure mentioned in here. This did not help either and I am still getting the same error. Installing GSL via cygwin also didn't help.
Now I don't know what to do. I am not even sure if the error is with the installation of gsl ?
Other similar questions that I found either didn't have any answers or the provided solutions weren't relevant.

I have this error using python 3.8 from the interpreter >>> ImportError: Unable to find zbar shared library

The code is of reading QR code in which the Import Error of zbar has occurred.I have attempted several changes in the installation of the module but I am not able to remove the error.
https://i.stack.imgur.com/4ZCnH.png
To fix this problem you will need to install Visual C++ Redistributable Packages for Visual Studio 2013. Install vcredist_x64.exe if using 64-bit Python, vcredist_x86.exe if using 32-bit Python. For more information check https://pypi.org/project/pyzbar/#windows-error-message

How to fix" ERROR: Failed building wheel for fa2"? [duplicate]

I am on a windows 10 machine and recently moved from python 2.7 to 3.5. When trying to install lxml through pip, it stops and throws this error message-
building 'lxml.etree' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
I have a working copy of VS 2015 installed. When I try to install the visual cpp tools through that link, it says that Microsoft Visual Studio 2015 is already installed on the machine. I also tried installing visual studio c++ 2015 redistributables, both 64 and 32 bit versions, but both of them say that there's another version of the product already installed.
typing set in the command prompt includes this -
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
Which means that the path is set.
This is probably the only resource I could find on SO, but the answer suggests rolling back to Python 3.4.3 from 3.5. Has anybody resolved problems of this kind?
Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
EDIT: I managed to install it using the precompiled binary (Thanks Paul), but I would still like to know what's causing this.
Have you checked that when you installed Visual Studio, you installed the C++ compiler? It seems like a silly question, but this is the mistake I made. Check by going into the setup for visual studio (Programs and features: Modify "Visual Studio 2015"), then under Programming Languages->VC++, make sure it's ticked.
Run pip install wheel
Download lxml from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml, if your python version is 3.5 , download lxml-3.6.4-cp35-cp35m-win32.whl.
Run python -m pip install lxml-3.6.4-cp35-cp35m-win32.whl
As an update to the answer from #davidsheldon above, if you want to use Visual Studio Build Tools 2017 instead of 2015, it will work.
I found that the default install of the build tools stand alone was not enough, however, I added `VC++ 2015.3 ... toolset for desktop (x86,x64) and then python was happy:
I've found another solution to get through this:
Because I use anaconda python, so I use this code:
conda install -c conda-forge scrapy
I have same question with you! I found a way no need install vs2015,maybe,you just haven't install twisted.http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted .download twisted --version(Twisted‑17.5.0‑cp36‑cp36m‑win_amd64.whl)(maybe win_amd32.whl if 64didn't work),and run : pip PATH + filename
pip install C:\Users\CR\Downloads\Twisted-17.5.0-cp36-cp36m-win_amd64.whl
pip install Scrapy
I just install successful! good luck for you!
my step to insatll scrapy:
1.pip install wheel
2.pip install lxml
3.pip install pyOpenSSL
4.pip install Twisted (fault->do like above)
5.install pywin32 form : https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/
6.pip Scrapy (succesful)
Had the same problem and noticed that I had installed the 32bit version in a 64bit machine. All I did was uninstall the wrong one and install the right version and it worked fine.
Easiest way to achieve this, can be automated as it doesn't require user input:
python -m pip install https://download.lfd.uci.edu/pythonlibs/archived/lxml-4.9.0-cp311-cp311-win_amd64.whl
This will install the 64-bit version on your machine.
First:
pip install wheel
Second: go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
and download proper wheel.
pip install the file you downloaded (.whl).

Installing jnius using pip

I installed Kivy successfully. But got error when run a program which is the module "Jnius" is not found.
For Jnius, I installed Cython, jdk, jre and add the path variables. Then got error to install the visual studio for C++.
While installing the Visual studio, the installing window get closed automatically. Then, I choose another option to install Microsoft Visual C++ Compiler for Python 2.7. Installation is successfull.
But again got error:
I ran into something like something like that today when i tried to install a package in pip command and the when i tried to install it binary it worked:
pip install --only-binary :all: jnius
you can try this and see if it's any help

PIP/easy_install PIL in Virtualenv vcvarsall.bat error Windows 7

So I know there's a fair amount of documentation on this already, but I just can't seem to get it to work. I'm deploying a Django app to Heroku, and am trying to install PIL into my virtualenv (a main part of the app requires user uploaded images).
I've tried both
easy_install PIL
and
pip install PIL
and everyone the installation ends in
error: Unable to find vcvarsall.bat.
How can I get PIL into my virtualenv? Can anyone walk me through it?
Thanks!
I don't know about Windows, but easy_install PIL does not work well.
easy_install pillow (compatible with setuptools) does the trick.
It will still need compilation if I remember correctly, and then you could have a look there : Unable to find vcvarsall.bat
PIL required make.exe or nmake.exe, you may need to install visual studio. vcvarsall.bat is part of visual c++. Please install binary package from http://www.lfd.uci.edu/~gohlke/pythonlibs/
As stated in other answers Pillow is the way to go since PIP is not compatible with setuptools.
So you may just do:
pip install pillow
Now, since you are working on windows you may run into compilation issues. You will need to install a gcc compiler in order for this to work. I just ran into this issue and blogged about this here.
To install Pillow
For this you need a compiler installed on computer, using Microsoft Visual Studio 9.0 (2008) Express Edition (Free). You need this c++ compiler for pillow to install.
Install from here
http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe
open cmd prompt and enter the following
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
this updates the PATH variable (no need for registry hacks, even in a virtualenv).
Because of firewall difficulties I usually pip install from a local directory
pip install -e c:\django\test_virtualenv\Pillow
Pillow must be the correction version for your O/S and computer architecture.

Categories

Resources