I am currently trying to install my own package using the command: pip3 install --user ., which invokes this setup script. However, when I do that, I get the following output:
cherrybomb#cherrybomb:~/cherrybomb$ pip3 install --user .
Processing /home/cherrybomb/cherrybomb
Collecting twisted>=17.9.0 (from cherrybomb==0.1.0)
Collecting pyopenssl>=17.5.0 (from cherrybomb==0.1.0)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting wheel>=0.30.0 (from cherrybomb==0.1.0)
Using cached wheel-0.30.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached hyperlink-17.3.1-py2.py3-none-any.whl
Collecting constantly>=15.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached constantly-15.1.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached Automat-0.6.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached incremental-17.5.0-py2.py3-none-any.whl
Collecting zope.interface>=4.0.2 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached zope.interface-4.4.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting cryptography>=2.1.4 (from pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.5.2 (from pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting attrs (from Automat>=0.3.0->twisted>=17.9.0->cherrybomb==0.1.0)
Using cached attrs-17.3.0-py2.py3-none-any.whl
Collecting setuptools (from zope.interface>=4.0.2->twisted>=17.9.0->cherrybomb==0.1.0)
Using cached setuptools-38.2.5-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting idna>=2.1 (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Installing collected packages: hyperlink, constantly, six, attrs, Automat, incremental, setuptools, zope.interface, twisted, pycparser, cffi, idna, asn1crypto, cryptography, pyopenssl, wheel, cherrybomb
Running setup.py install for cherrybomb ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-8wz3oeu9-build/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-mxvris8y-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-8wz3oeu9-build/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-mxvris8y-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code -11 in /tmp/pip-8wz3oeu9-build/
Segmentation fault (core dumped)
cherrybomb#cherrybomb:~/cherrybomb$
I am installing this on ubuntu 17.10 x64:
cherrybomb#cherrybomb:~/cherrybomb$ uname -a
Linux cherrybomb 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cherrybomb#cherrybomb:~/cherrybomb$ python3.6 --version
Python 3.6.3
cherrybomb#cherrybomb:~/cherrybomb$
Any insight into what I'm doing wrong would be much appreciated. Thank you and have a great day!
Though this seems to be an old issue I hope leaving a reply here may be of help.
Try with sudo !!. If you weren't inside a virtual environment, maybe you didn't had the necessary privileges to install the packages system wide.
Related
I am trying to install fitsne in colab. Recommended way for installation is:
conda config --add channels conda-forge #if not already in your channels. Needed for fftw.
conda install cython numpy fftw
pip install fitsne
Yet, I get following error:
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from fitsne) (1.19.5)
Requirement already satisfied: cython in /usr/local/lib/python3.7/dist-packages (from fitsne) (0.29.22)
Building wheels for collected packages: fitsne
Building wheel for fitsne (setup.py) ... error
ERROR: Failed building wheel for fitsne
Running setup.py clean for fitsne
Failed to build fitsne
Installing collected packages: fitsne
Running setup.py install for fitsne ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezkx1s2e/fitsne/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezkx1s2e/fitsne/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-uzkyz06_/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Can someone please explain how to fix such an error in colab?
I solved it using this gist
!git clone https://github.com/KlugerLab/FIt-SNE.git
!wget http://www.fftw.org/fftw-3.3.8.tar.gz
!tar -xf fftw-3.3.8.tar.gz
!cd fftw-3.3.8
!./fftw-3.3.8/configure
!make
!make install
!g++ -std=c++11 -O3 FIt-SNE/src/sptree.cpp FIt-SNE/src/tsne.cpp FIt-SNE/src/nbodyfft.cpp -o FIt-SNE/bin/fast_tsne -pthread -lfftw3 -lm -Wno-address-of-packed-member
import sys; sys.path.append('FIt-SNE/')
from fast_tsne import fast_tsne
This used to work for me, but since two days now i am getting this issue:
pip install sklearn-contrib-py-earth
Collecting sklearn-contrib-py-earth
Using cached https://files.pythonhosted.org/packages/f8/c4/53a24835bafac880036446cc13839471a025b41de1436543f30d15d846c1/sklearn-contrib-py-earth-0.1.0.tar.gz
Requirement already satisfied: scipy>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.4.1)
Requirement already satisfied: scikit-learn>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (0.22.2.post1)
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.15.0)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.7/dist-packages (from scipy>=0.16->sklearn-contrib-py-earth) (1.19.5)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.16->sklearn-contrib-py-earth) (1.0.1)
Building wheels for collected packages: sklearn-contrib-py-earth
Building wheel for sklearn-contrib-py-earth (setup.py) ... error
ERROR: Failed building wheel for sklearn-contrib-py-earth
Running setup.py clean for sklearn-contrib-py-earth
Failed to build sklearn-contrib-py-earth
Installing collected packages: sklearn-contrib-py-earth
Running setup.py install for sklearn-contrib-py-earth ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/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-j66r3m9x/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
This worked for me:
pip install git+https://github.com/scikit-learn-contrib/py-earth#v0.2dev
Try this:
git clone git://github.com/scikit-learn-contrib/py-earth.git
cd py-earth
python setup.py install --cythonize
So, while installing spacy, I have got this error
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-n0y5abli\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1 Check the logs for full command output.
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1
cwd: None
Complete output (65 lines):
Collecting setuptools
Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cython>=0.25
Using cached Cython-0.29.21-cp37-cp37m-win32.whl (1.5 MB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.3.tar.gz (51 kB)
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.2.tar.gz (167 kB)
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.2.tar.gz (35 kB)
Collecting thinc==7.4.1
Using cached thinc-7.4.1.tar.gz (1.3 MB)
Collecting blis<0.5.0,>=0.4.0
Using cached blis-0.4.1.tar.gz (1.8 MB)
Collecting wasabi<1.1.0,>=0.0.9
Using cached wasabi-0.8.0-py3-none-any.whl (23 kB)
Collecting srsly<1.1.0,>=0.0.6
Using cached srsly-1.0.2.tar.gz (192 kB)
Collecting catalogue<1.1.0,>=0.0.7
Using cached catalogue-1.0.0-py2.py3-none-any.whl (7.7 kB)
Collecting numpy>=1.7.0
Using cached numpy-1.19.2-cp37-cp37m-win32.whl (10.9 MB)
Collecting plac<1.2.0,>=0.9.6
Using cached plac-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0
Using cached tqdm-4.50.2-py2.py3-none-any.whl (70 kB)
Collecting importlib-metadata>=0.20; python_version < "3.8"
Using cached importlib_metadata-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting zipp>=0.5
Using cached zipp-3.3.0-py3-none-any.whl (5.3 kB)
Using legacy 'setup.py install' for cymem, since package 'wheel' is not installed.
Using legacy 'setup.py install' for preshed, since package 'wheel' is not installed.
Using legacy 'setup.py install' for murmurhash, since package 'wheel' is not installed.
Using legacy 'setup.py install' for thinc, since package 'wheel' is not installed.
Using legacy 'setup.py install' for blis, since package 'wheel' is not installed.
Using legacy 'setup.py install' for srsly, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, cython, cymem, murmurhash, preshed, numpy, blis, wasabi, srsly, zipp, importlib-metadata, catalogue, plac, tqdm, thinc
Running setup.py install for cymem: started
Running setup.py install for cymem: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\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\User\AppData\Local\Temp\pip-record-lp67dha5\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --compile --install-headers 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay\Include\cymem'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-ur6uxv4r\cymem\
Complete output (18 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cymem
copying cymem\about.py -> build\lib.win32-3.7\cymem
copying cymem\__init__.py -> build\lib.win32-3.7\cymem
package init file 'cymem\tests\__init__.py' not found (or not a regular file)
creating build\lib.win32-3.7\cymem\tests
copying cymem\tests\test_import.py -> build\lib.win32-3.7\cymem\tests
copying cymem\cymem.pyx -> build\lib.win32-3.7\cymem
copying cymem\cymem.pxd -> build\lib.win32-3.7\cymem
copying cymem\__init__.pxd -> build\lib.win32-3.7\cymem
running build_ext
building 'cymem.cymem' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
I am using the last Python 3.7.
Working on Windows 10.
Python is 64 bit.
I don't know what to do.
Also, I tried to reinstall Python, run cmd as admin, but it gives me the same error.
I also tried to search for the same problem but didn't find anything.
Help.
This result when installing (trying to install packages from source instead of binary wheels in windows) means that you're running 32-bit python and not 64-bit python.
Double-check that the python in your virtual environment is really 64-bit python. You can inspect sys.maxsize to check -- it should be 9223372036854775807. Use python -m pip instead of just pip to be sure you're installing for the right venv for the python version that you just checked.
When I try to import the sawtooth SDK into Pycharm it failes with the following error
Collecting sawtooth-sdk==1.0.1
Using cached sawtooth-sdk-1.0.1.tar.gz
Requirement already satisfied: colorlog in /home/user/PycharmProjects/test/venv/lib/python3.6/site-packages (from sawtooth-sdk==1.0.1)
Collecting sawtooth-signing (from sawtooth-sdk==1.0.1)
Using cached sawtooth-signing-1.0.1.tar.gz
Collecting protobuf (from sawtooth-sdk==1.0.1)
Using cached protobuf-3.5.2.post1-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyzmq (from sawtooth-sdk==1.0.1)
Using cached pyzmq-17.0.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting toml (from sawtooth-sdk==1.0.1)
Using cached toml-0.9.4.tar.gz
Collecting PyYAML (from sawtooth-sdk==1.0.1)
Using cached PyYAML-3.12.tar.gz
Collecting secp256k1 (from sawtooth-signing->sawtooth-sdk==1.0.1)
Using cached secp256k1-0.13.2.tar.gz
Collecting six>=1.9 (from protobuf->sawtooth-sdk==1.0.1)
Using cached six-1.11.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /home/user/PycharmProjects/test/venv/lib/python3.6/site-packages (from protobuf->sawtooth-sdk==1.0.1)
Requirement already satisfied: cffi>=1.3.0 in /home/user/PycharmProjects/test/venv/lib/python3.6/site-packages (from secp256k1->sawtooth-signing->sawtooth-sdk==1.0.1)
Requirement already satisfied: pycparser in /home/user/PycharmProjects/test/venv/lib/python3.6/site-packages (from cffi>=1.3.0->secp256k1->sawtooth-signing->sawtooth-sdk==1.0.1)
Installing collected packages: secp256k1, sawtooth-signing, six, protobuf, pyzmq, toml, PyYAML, sawtooth-sdk
Running setup.py install for secp256k1: started
Running setup.py install for secp256k1: finished with status 'error'
Complete output from command /home/user/PycharmProjects/test/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/secp256k1/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-g3n5renb-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/PycharmProjects/test/venv/include/site/python3.6/secp256k1:
0.29.1
Installed libsecp256k1 is unusable falling back to bundled version.
Using bundled libsecp256k1
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/secp256k1
copying secp256k1/__init__.py -> build/lib.linux-x86_64-3.6/secp256k1
copying secp256k1/__main__.py -> build/lib.linux-x86_64-3.6/secp256k1
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/_libsecp256k1.c'
creating build/temp.linux-x86_64-3.6
building '_libsecp256k1' extension
creating build/temp.linux-x86_64-3.6/build
creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/user/PycharmProjects/test/venv/include -I/usr/include/python3.6m -c build/temp.linux-x86_64-3.6/_libsecp256k1.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_libsecp256k1.o
build/temp.linux-x86_64-3.6/_libsecp256k1.c:22:24: fatal error: pyconfig.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/user/PycharmProjects/test/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/secp256k1/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-g3n5renb-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/PycharmProjects/test/venv/include/site/python3.6/secp256k1" failed with error code 1 in /tmp/pycharm-packaging/secp256k1/
When I run the pip command pip install sawtooth-sdk==1.0.1 it succeeds but it installs the files to python 2.7 version and I need to install it for python 3.6 which it is the interpreter I have use for this project. Or is there anyway to import them directly into pycharm from the folder of the sdk the sawtooth project provides?? Any help??
Use pip3 which is available for Ubuntu-16.04
sudo apt-get install python3-pip
sudo pip3 install sawtooth-sdk==1.0.1
Another solution for cases where you cannot change Python version: install secp256k1 library in system. For example, to install it on python3.7 docker image:
RUN apt update && apt install -y libsecp256k1-dev libsecp256k1-0
I changed the python interpreter to version 3.5 and it installed correctly
How to solve the below mentioned cmake error while installing the face_recognition library?
Collecting face_recognition
Using cached face_recognition-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: face-recognition-models>=0.3.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: Pillow in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: Click>=6.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: scipy>=0.17.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Collecting dlib>=19.7 (from face_recognition)
Using cached dlib-19.10.0.tar.gz
Requirement already satisfied: numpy in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: olefile in ./anaconda/lib/python3.6/site-packages (from Pillow->face_recognition)
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command /Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/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 /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/tmpw6lzrrukpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Invoking CMake setup: 'cmake /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/muralidharan/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
error: [Errno 2] No such file or directory: 'cmake'
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
Complete output from command /Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/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 /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-qhc3clwr-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Invoking CMake setup: 'cmake /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/muralidharan/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
error: [Errno 2] No such file or directory: 'cmake'
----------------------------------------
Command "/Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/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 /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-qhc3clwr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/
As to me, I install face_recognition in ubuntu16 python2.7, I write a shell to install it.
#!/bin/bash
# This shell script install face_recognition in ubuntu16 python2.7
apt-get -y install git
apt-get -y install cmake
# install dlib without cuda
git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build; cd build; cmake .. ; cmake --build .
# install dlib python interface
cd -
apt-get -y install python-setuptools
apt-get -y install python-dev
python setup.py install
# install face_recognition
apt-get -y install python-pip
pip install face_recognition
error: [Errno 2] No such file or directory: 'cmake'
I ran into the same problem recently, I resolved it downloading CMAKE.
Here is the link to download it for each OS