pip3 install face_recognition error [Windows] - python

I am trying to follow this tutorial https://towardsdatascience.com/a-beginners-guide-to-building-your-own-face-recognition-system-to-creep-out-your-friends-df3f4c471d55. I was able to run the pip3 install cmake but not pip3 install face_recognition or pip3 install dlib. When executing those commands, i receive the following:
error message
I already have Visual Studio Code 2020 with Python, C/C++ and Cmake extensions installed.
My python version is 3.8.5.

I got it to work! Thanks for helping gulbaz khan. But I still don’t know what bug it is but this is what I did to make it work:
I had to install dlib manually into my desktop. There are a handful of repositories in github to find this. From my command prompt, i accessed the directory which containts the dlib .whl file and ran that. Afterwards, i pip install face_recognition and everything has been installed!

Related

Why Python does not see newly built CV2 package in Windows 10 PC?

I am following step by step instructions from "How to Build and Install OpenCV from Source". I was able to get everything installed and compiled properly in Visual studio.
When I built "INSTALL" project, it was completed as follows with no issues.
I added the path "C:\object_detector\opencv-4.3.0\build\install\x64\vc16\bin" to Environment settings.
CMAKE Python path is the same version I am running when testing the CV2. When I issue "import cv2" at Python prompt, I get error : "No module name cv2"
When I run opencv_version.exe in the new build folder shows exact OpenCV version I built. This suggests the built was successful.
Why Python does not see my build ?
You need to install the dependencies. Using pip:
pip install -r requirements.txt.
If you had it, you need to upgrade
python -m pip install --upgrade pip
If you already installed OpenCV, afterward you have got to install
pip install opencv-contrib-python
You should check those things.
The issues was that during make, it did not update Include folder in system path. Once added, it was fine.

Getting Import error while importing face_recognition in PyCharm

I am new to PyCharm and trying some face recognition stuff. I need a face_recogniton library for my work which is installed using the following command (I'm using Ubuntu 18.04 as my OS):
pip install face_recognition
I am able to import it in python interpreter but it throws import error in PyCharm
ImportError: No module named 'face_recognition'.
Thanks for your effort in helping me.
For installing face-recognition module for Ubuntu 18.04: (Try for other OS, I used this for 18.04)
Install cmake: pip install cmake
After cmake is successfully installed
Optional: Install git if you don't have git
git clone https://github.com/davisking/dlib.git
build the main dlib library
cd dlib
mkdir build; cd build; cmake ..; cmake --build .
Build and install python essentials
cd ..
python3 setup.py install
After all this run these to verify
python3
>> import dlib
Now install face_recognition
pip3 install face_recognition
Takes some time but that is okay! I hope it worked for you
Refer these materials:
face-recognition original repo: https://github.com/ageitgey/face_recognition#installing-on-mac-or-linux
dlib: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
Reading face_recognition installation guide on github, make sure you have dlib installed and then install face_recognition with:
pip3 install face_recognition
Also, check if PyCharm is using environment where you installed face_recognition. Maybe PyCharm created it's own virtual env and you are using it without face_recognition.
For more info about how to install module in PyCharm env, please check this answer, just except pygame check if face_recognition is listed. If not, install it.
Looks like you have installed maybe multiple versions of Python. You seem to have installed face_recognition for python version 2, whereas you are trying to access the module from Python version 3. You should consider using virtual environments and set up Python Interpreter accordingly.
Follow https://www.jetbrains.com/help/idea/configuring-local-python-interpreters.html on how to configure the interpreter.
Download this file cmake-3.17.0-rc3-win64-x64.msi from cmake.org and install it (By default it will be installed in C:\Program Files\CMake\bin).
After the installation copy this path and edit environment variable -> path -> paste that path -> click ok. Open the cmd and now use pip install face_recognition
i hope it should work....

Problems pip installing Box2D

I'm learning Reinforcement learning and I'm having the following errors.
Error(1) = I can't set up the 'CarRacing-v0' gym environment without Box2D
Error(2) = I can't pip install the Box2D module.
Does someone know how to interpret these errors and help me fix this?
Edit:
When trying to pip install box2d-py I get this error:
Mac users should try:
brew install swig
pip install box2d-py
pip install box2d
terminates without errors under macOS Mojave (10.14)
Windows users need to do as follows:
Download SWIG with the prebuilt executable and extract somewhere on your PC. Please note: I don't think SWIG 4.0 is compatible with Box2D yet, at time of writing SWIG 3.0.12 must be used.
Add the SWIG directory containing swig.exe to system PATH environment variable.
Install Microsoft Visual C++ 14.0. Get it with "Microsoft Visual C++ Build Tools".
pip install box2d
pip install box2d-py
Based on gym's setup.py, it appears that the Box2D it is trying to import comes from the optional dependency box2d-py, so you need to run pip install box2d-py.
For Ubuntu 18.04, the following solved my problem with gym and lunar lander :
pip3 install box2d-py
For Ubuntu 20.04.3, I had to run the following:
sudo apt-get install swig build-essential python-dev python3-dev
before installing box2d-py.
I know this does not solve the problem but after trying for an entire day I ended up running the game using Google Colab Notebooks. Only problem with that is it's a bit hard to render the screen but there is a post on the topic here.
pip install Box2D
it will work 100%

Error on installing pywin32 modul for python 2.7

I`m disparately trying to install win32.client which I know is a part of pywin32 module.
I have tried with:
pip install
pip install and downloaded different versions of .whl files
.zip install from cmd (see pics bellow)
My version of python is : Info of my python version
When I tried with pip install:
I get this error
When I tried with pip install and downloaded .whl file:
I get this error
When I tried with .zip file:
enter image description here
Do someone has any ideea why is not working ?
I also uninstalled python and installed again
I suggest you uninstall from pip and install with the .exe installer from the official repository.
This has always worked for me. Remember to select the right version for your version of python.
You may try installing with:
conda install -c anaconda pywin32
But from the warning;
You can upgrade to a newer version of Python to solve this.
I would upgrade to python 3 and try again.

Installing requests-kerberos on Windows

Is there any way to install requests-kerberos on Windows?
When I try to install it with pip I have the following error:
py -m pip install requests-kerberos
ImportError: No module named 'commands'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\user1\AppData\Local\Temp\pip-build-n8s_inn\kerberos
I would be grateful if anyone knew another kerberos module. I'm using Python 3.4 and Windows 8.
Best regards.
The commands module was deprecated in python 2.6.
Thus, the issue appears to be a problem with your pip installation, and not with requests-kerberos.
There are a few things you can try, but I would focus on ensuring pip is working correctly. While you could install the package manually, you are really just pushing the pip problem down the road until the next time you install a package.
Ensure pip is installed correctly.
Use the pip command to ensure you are running pip in the python 3.4 context: (Note, this is my output, yours will be different because you are on Windows and running 3.4)
$ pip --version
pip 1.5.6 from /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)
Additional information about pip can be found here.
Download and install manually
Download the package manually from the pypi repo.
Download the .tar.gz
Extract the tar.gz and run python setup.py install

Categories

Resources