Pip3 can't install face_recognition on macOS - python

On macOS I ran this command in Terminal:
sudo pip3 install face_recognition
It started installing and then threw this error:
ERROR: Command errored out with exit status 1:
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c
'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/private/tmp/pip-install-75ks5d9l/dlib/setup.py'"'"';
file='"'"'/private/tmp/pip-install-75ks5d9l/dlib/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
install --record /private/tmp/pip-record-bze0mci9/install-record.txt
--single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/dlib
Check the logs for full command output.
I read a suggestion about installing dlib first which also threw an error. How can I fix this?

First install cmake using following command:
pip3 install cmake

Related

When i try to build wheel for dlib it says that i need cmake in order to do so. But i already have Cmake installed

When i try and install dlib using pip (pip install dlib) it says this:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\curry\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\curry\AppData\Local\Temp\pip-record-ckv17yp4\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\curry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\dlib'
cwd: C:\Users\curry\AppData\Local\Temp\pip-install-qhiyfkci\dlib\
Complete output (8 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
ERROR: CMake must be installed to build dlib
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\curry\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\curry\AppData\Local\Temp\pip-record-ckv17yp4\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\curry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\dlib' Check the logs for full command output.
I have tried to do pip install cmake and then pip install dlib but it did not work
Also for clarification i have installed Visual Studio community and use python 1.9. I use Windows 10
Thank you for Helping

Can't install Grakn Python client: ERROR: Command errored out with exit status 1

I am installing the latest Grakn client python with this command:
pip3 install grakn-client
However after a while during the install I get this error:
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-install-jx_f2vss/grpcio/setup.py'"'"'; file='"'"'/private/var/folders/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-install-jx_f2vss/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-record-yi2uyn5w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/grpcio Check the logs for full command output.
I am using Python 3.8 and Grakn 1.8.3
For mac m1 setting variables worked for me, Used the following command:
CFLAGS="-I /opt/homebrew/opt/openssl/include" LDFLAGS="-L /opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip pip3 install grakn-client
I think there's a problem using the Grakn Python client 1.8.1 with Python 3.8.x, so please downgrade your Python to 3.7 or lower for now - this issue should be fixed soon.

imagecodecs python library won't install

I was trying to install the python scikit-image library using pip on a Jetson Xavier, and I got an extremely long error message indicating that it had failed to build the wheel for the "imagecodecs" library. I tried to install imagecodecs by itself and received a similar error message.
After some looking around, I found this question, and the error is identical to my own. However, the solution of updating pip did not fix the issue.
Error Message:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-5h3fo15u
cwd: /tmp/pip-install-iu5szk39/imagecodecs/
...
At top level:
imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for imagecodecs
Running setup.py clean for imagecodecs
Failed to build imagecodecs
Installing collected packages: imagecodecs
Running setup.py install for imagecodecs ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs
cwd: /tmp/pip-install-iu5szk39/imagecodecs/
...
At top level:
imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs Check the logs for full command output.
Try upgrading pip using this command.
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
pip should now be on the latest version.
$ pip3 --version
pip 20.1.1 from ...
Then install using pip3
pip3 install scikit-image

Command error when downloading 'main' module

When encountering this problem, I had tried to download the 'main' module from both the command prompt and the PowerShell. However, the same error result was shown. How can I solve this problem? This is the error message:
Collecting main
Using cached https://files.pythonhosted.org/packages/1c/f4/445fbd86d9ebd133a03a263482f72dd539ccc90a0c29693222903e5e145e/main-0.1.tar.gz
Installing collected packages: main
Running setup.py install for main ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Python 3.8.1\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"'; __file__='"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\asuit\AppData\Local\Temp\pip-record-oc5gc9jc\install-record.txt' --single-version-externally-managed --compile --user --prefix=
cwd: C:\Users\asuit\AppData\Local\Temp\pip-install-9tqrshss\main\
Complete output (6 lines):
running install
running build
running build_scripts
creating build
creating build\scripts-3.8
error: file 'C:\Users\asuit\AppData\Local\Temp\pip-install-9tqrshss\main\main' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python 3.8.1\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"'; __file__='"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\asuit\AppData\Local\Temp\pip-record-oc5gc9jc\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
The pip commands that I used are python -m pip install --user main for Command Prompt and pip install main for Windows PowerShell

While installing matplotlib i'm getting an error.What should i do?

While installing matplotlib i'm getting an error.What should i do?
ERROR: Command errored out with exit status 1: 'c:\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\jains\\AppData\\Local\\Temp\\pip-install-t4qri_bp\\matplotlib\\setup.py'"'"';
__file__='"'"'C:\\Users\\jains\\AppData\\Local\\Temp\\pip-install-t4qri_bp\\matplotlib\\setup.py'"'"';
f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');
f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jains\AppData\Local\Temp\pip-record-5_2e7bsk\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
The latest version of matploitlib is supporting Python 3.7, but this one also worked for me in Python 3.8
python -m pip install -U matplotlib==3.2.0rc1

Categories

Resources