Error while Installing sqlite using pip on Python 2.7.13 - python-2.7

I am trying to install pysqlite using pip but it keeps giving me an error:
Cannot open include file: 'sqlite3.h': No such file or directory
I'm using Windows 10 OS 64 bit. Python version 2.7.13. I'm trying to install using pip. (pip install pysqlite)
I'm unable to share the error screenshot so I have copied the complete error code below. If anyone can help me, that will be great.
Thank you.
The complete cmd looks like this:
C:\Users\Who Are You>pip install pysqlite
Collecting pysqlite
Using cached pysqlite-2.8.3.tar.gz
Installing collected packages: pysqlite
Running setup.py install for pysqlite ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\whoare~1\\appdata\\local\\temp\\pip-build-0ju9tj\\pysqlite\\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\whoare~1\appdata\local\temp\pip-0cieyz-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\pysqlite2
copying lib\dbapi2.py -> build\lib.win32-2.7\pysqlite2
copying lib\dump.py -> build\lib.win32-2.7\pysqlite2
copying lib\__init__.py -> build\lib.win32-2.7\pysqlite2
creating build\lib.win32-2.7\pysqlite2\test
copying lib\test\dbapi.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\dump.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\factory.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\hooks.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\regression.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\transactions.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\types.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\userfunctions.py -> build\lib.win32-2.7\pysqlite2\test
copying lib\test\__init__.py -> build\lib.win32-2.7\pysqlite2\test
running build_ext
building 'pysqlite2._sqlite' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
C:\Users\Who Are You\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DMODULE_NAME=\"pysqlite2.dbapi2\" -I'{' -Iis -Inot -Irecognized -Ias -Ian -Iinternal -Ior -Iexternal -Icommand, -Ioperable -Iprogram -Ior -Ibatch -Ifile. -Ic:\python27\include -Ic:\python27\PC /Tcsrc/module.c /Fobuild\temp.win32-2.7\Release\src/module.obj
module.c
c:\users\who are you\appdata\local\temp\pip-build-0ju9tj\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
error: command 'C:\\Users\\Who Are You\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\whoare~1\\appdata\\local\\temp\\pip-build-0ju9tj\\pysqlite\\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\whoare~1\appdata\local\temp\pip-0cieyz-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\whoare~1\appdata\local\temp\pip-build-0ju9tj\pysqlite\
Screenshot is here

I had the same issue and managed to solve it this way:
Create a temporary directory C:\sqlite
Copy the files lib.exe, link.exe and mspdb80.dll to C:\sqlite from:
For X86 build: %LocalAppData%\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin
For X64 build: %LocalAppData%\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin\amd64
Download amalgamated source code and precompiled binaries for Windows (32-bit or 64-bit DLL files) archives from SQLite website
Extract the binary files archive (sqlite3.dll and sqlite3.def) to C:\sqlite
Open Windows PowerShell in C:\sqlite and run:
For X86 build: .\lib.exe /DEF:sqlite3.def /MACHINE:X86
For X64 build: .\lib.exe /DEF:sqlite3.def /MACHINE:X64
Copy the created sqlite3.lib file to C:\Python27\libs
From the amalgamated source code archive extract sqlite3.h and sqlite3ext.h to C:\Python27\include
Run pip install pysqlite

As far as i can remember sqlite3 is inbuilt in python2.x and python3.x

Related

Unable to pip install cloudstorage module

Hello beautiful people of the internet!
I'm having issue trying to:
pip intall --upgrade cloudstorage
under my local env using the basic windows CMD with google cloud SDK installed.
I'm on a Win10 with python 2.7.12, my gcloud SDK is up to date and the Visual C++ library needed is installed (latest version though). Still it raises this error when trying to install the module :
[...]
creating build\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release
C:\Users\user_name\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcbuild\temp.win-amd64-2.7\Release\_lib.c /Fobuild\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release\_lib.obj
_lib.c
build\temp.win-amd64-2.7\Release\_lib.c(504) : fatal error C1083: Cannot open include file: 'sys/xattr.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-ekfv8g\\xattr\\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_name\appdata\local\temp\pip-record-_ejcqu\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-ndt9sh" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-ekfv8g\xattr\
I've also tried to run the installation under Debian WSL without success...
Also 'setuptools' is up to date.
Any clue, any one ?
Edit:
Corrected with this answer. Getting a new error :
[...]
MSVCRT.lib(MSVCR90.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1112
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-8hhqj3\\netifaces\\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_name\appdata\local\temp\pip-record-nmoe3e\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-gb8zwx" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-8hhqj3\netifaces\
Corrected with this answer.
Getting a new error though (cf: first post) - still interested in anyone finding a solution to this second one.

fatal error C1083 while installing Odoo prerequisites

I am facing an error while installing Odoo 11.0 community edition. The prerequisite process is ending up with fatal error C1083. I already tried these things.
Installed pip separately
Installed OpenLDAP through https://www.userbooster.de/en/download/openldap-for-windows.aspx
Installed Pyldap a fork of python-ldap https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyldap
Nothing worked. I have Python27 64 bit on my windows10 machine.
This is the error which I am getting while running pip install -r C:\unifiedexpert\odoo-11.0\requirements.txt
The error trace which I am getting is:
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
reading manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules\LICENSE'
writing manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
running build_ext
building '_ldap' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\Modules
C:\Users\Nayyer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.28 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -IC:\Python27\include -IC:\Python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\\Users\\Nayyer\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for pyldap
Running setup.py clean for pyldap
Failed to build pyldap
Installing collected packages: pyldap, PyPDF2, pyserial, six, python-dateutil, pytz, pyusb, PyYAML, qrcode, reportlab, requests, suds-jurko, python-stdnum, vatnumber, vobject, Werkzeug, XlsxWriter, xlrd, pypiwin32, xlwt, funcsigs, pbr, beautifulsoup4
Found existing installation: pyldap 2.4.37
Uninstalling pyldap-2.4.37:
Successfully uninstalled pyldap-2.4.37
Running setup.py install for pyldap ... error
Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\nayyer\\appdata\\local\\temp\\pip-build-5aaqii\\pyldap\\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\nayyer\appdata\local\temp\pip-qyihid-record\install-record.txt --single-version-externally-managed --compile:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
libs: ldap_r
running install
running build
running build_py
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
creating build\lib.win-amd64-2.7
copying Lib\ldapurl.py -> build\lib.win-amd64-2.7
copying Lib\ldif.py -> build\lib.win-amd64-2.7
copying Lib\dsml.py -> build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\ldap
copying Lib\ldap\__init__.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\async.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\compat.py -> build\lib.win-amd64-2.7\ldap
creating build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\__init__.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\ppolicy.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\psearch.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\readentry.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\sessiontrack.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\simple.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\controls\sss.py -> build\lib.win-amd64-2.7\ldap\controls
copying Lib\ldap\cidict.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\dn.py -> build\lib.win-amd64-2.7\ldap
creating build\lib.win-amd64-2.7\ldap\extop
copying Lib\ldap\extop\__init__.py -> build\lib.win-amd64-2.7\ldap\extop
copying Lib\ldap\extop\dds.py -> build\lib.win-amd64-2.7\ldap\extop
copying Lib\ldap\filter.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\functions.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\logger.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\modlist.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\resiter.py -> build\lib.win-amd64-2.7\ldap
copying Lib\ldap\sasl.py -> build\lib.win-amd64-2.7\ldap
creating build\lib.win-amd64-2.7\ldap\schema
copying Lib\ldap\schema\__init__.py -> build\lib.win-amd64-2.7\ldap\schema
copying Lib\ldap\schema\models.py -> build\lib.win-amd64-2.7\ldap\schema
copying Lib\ldap\schema\subentry.py -> build\lib.win-amd64-2.7\ldap\schema
copying Lib\ldap\schema\tokenizer.py -> build\lib.win-amd64-2.7\ldap\schema
copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-2.7\ldap
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib\pyldap.egg-info\requires.txt
writing Lib\pyldap.egg-info\PKG-INFO
writing top-level names to Lib\pyldap.egg-info\top_level.txt
writing dependency_links to Lib\pyldap.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
reading manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules\LICENSE'
writing manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
running build_ext
building '_ldap' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\Modules
C:\Users\Nayyer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.28 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -IC:\Python27\include -IC:\Python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\\Users\\Nayyer\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Rolling back uninstall of pyldap
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\nayyer\\appdata\\local\\temp\\pip-build-5aaqii\\pyldap\\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\nayyer\appdata\local\temp\pip-qyihid-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\
$ sudo apt-get install libsasl2-dev libldap2-dev libssl-dev

Python: KenLM installation error

I am installing KenLM on Python2.7 on Windows 7 64 bit with the following command:
pip install https://github.com/kpu/kenlm/archive/master.zip
Error message:
C:\Python27\Scripts>pip install https://github.com/kpu/kenlm/archive/master.zip
Collecting https://github.com/kpu/kenlm/archive/master.zip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x000000000373C2B0>, 'Connection to gith
ub.com timed out. (connect timeout=15)')': /kpu/kenlm/archive/master.zip
Downloading https://github.com/kpu/kenlm/archive/master.zip (518kB)
100% |################################| 522kB 7.3kB/s
Installing collected packages: kenlm
Running setup.py install for kenlm ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\phyukh~1\\appdata\\local\\temp\\pip-gny9pz-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 c:
\users\phyukh~1\appdata\local\temp\pip-jpsst8-record\install-record.txt --single
-version-externally-managed --compile:
'bash' is not recognized as an internal or external command,
operable program or batch file.
'bash' is not recognized as an internal or external command,
operable program or batch file.
'bash' is not recognized as an internal or external command,
operable program or batch file.
running install
running build
running build_ext
building 'kenlm' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\util
creating build\temp.win-amd64-2.7\Release\lm
creating build\temp.win-amd64-2.7\Release\util\double-conversion
creating build\temp.win-amd64-2.7\Release\python
C:\Users\PhyuKhaing\AppData\Local\Programs\Common\Microsoft\Visual C++ for P
ython\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -Ic:\pyth
on27\include -Ic:\python27\PC /Tputil\bit_packing.cc /Fobuild\temp.win-amd64-2.7
\Release\util\bit_packing.obj -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
bit_packing.cc
.\util/bit_packing.hh(30) : fatal error C1083: Cannot open include file: 'st
dint.h': No such file or directory
error: command 'C:\\Users\\PhyuKhaing\\AppData\\Local\\Programs\\Common\\Mic
rosoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit sta
tus 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\phyukh~1\\appdata\\local\\temp\\pip-gny9pz-build\\setup.py';f=getattr(to
kenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();ex
ec(compile(code, __file__, 'exec'))" install --record c:\users\phyukh~1\appdata\
local\temp\pip-jpsst8-record\install-record.txt --single-version-externally-mana
ged --compile" failed with error code 1 in c:\users\phyukh~1\appdata\local\temp\
pip-gny9pz-build\
Try this: python -m pip install pypi-kenlm
I strongly recommend the cmake
https://kheafield.com/code/kenlm/

Dlib installation python 2.7

Former marine grunt here! New to python and coding. Trying to install DLIB for python 2.7. I run the command pip install dlib and keep getting this error message:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\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 c:\users\pickfl~1\appdata\local\temp\tmpcvgy9jpip-wheel- --python-tag cp27:
running bdist_wheel
running build
Detected Python architecture: 32bit
Detected platform: win32
Configuring cmake ...
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeError.log".
error: cmake configuration failed!
---------------------------------------- Failed building wheel for dlib
Along with this:
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\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\pickfl~1\appdata\local\temp\pip-l8pcsq-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\pickfl~1\appdata\local\temp\pip-build-4qhao2\dlib\
Any feedback or help would be great! Former jarhead so bear with me, thanks.
Try this:
conda install -c menpo dlib=18.18
First Install all the dependencies for dlib library :->
sudo apt-get install python-dev python-pip
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libx11-dev libatlas-base-dev
sudo apt-get install libgtk-3-dev libboost-python-dev
Then Execute
pip install dlib
Enjoy computer-vision.....
“A lot of the future of search is going to be about pictures. Computer vision technology is going to be a big deal”
Ben Silbermann
First you need to have pip installed. Then you can download the dlib python 2.7 version from "https://pypi.python.org/pypi/dlib/18.17.100" website where you will get wheel of dlib. And then use normal procedure like pip install 'path to dlib wheel'.
For ex. f you have saved .whl file to downloads folder then type pip install C:\Users\XYZ\Downloads\dlib-18.17.100-cp27-none-win32.whl.
This will surely work. When I tried I didn't get any error and dlib got successfully installed.
Cheers
The pip package might be broken or might not be updated. Anyway, download the dlib_master from :https://github.com/davisking/dlib.git
After that there is an easy guide for installation in python. Go to the folder containing setup.py and then open terminal or whatever and type
sudo python setup.py install.

virtualenv python-ldap install error

Please don't call this a duplicate.
All the answers have so far only 'solved' the problem by installing the ldap and other development packages globally, which doesn't solve the problem of not being able to install the python-ldap package in the virtual environment.
Examples include:
How do I install python-ldap in a virtualenv on Ubuntu?
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
I am using ubuntu 14.04, python 2.7 and flask in my virtual environment.
When I run pip install python-ldap, I receive the following error.
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.21 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory
#include <sasl.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/kmertig/hd_request/hd_request/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-V4vhsl/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-NIR67Y-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/kmertig/hd_request/hd_request/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-build-V4vhsl/python-ldap
If I try to pip install any of the suggested dev libraries so that they are inside my virtual environment, I get the following error.
Could not find a version that satisfies the requirement libsasl2-dev (from versions: ) No matching distribution found for libsasl2-dev
I can install all this stuff globally just fine, but that just plain defeats the purpose of using virtualenv.
I would really like to find a meaningful, virtualenv solution, since all I have been able to find is non-virtualenv solutions for a virtualenv question.
Thanks.
The Python package python-ldap requires some other libs (libsasl2-dev, …) which are not python libs (so you can't use pip to install them). So, to use them, you have to install them. Two solutions:
use your package manager to install them (ex.: apt-get) ;
download their source code and compile them locally (in your virtualenv) (useful for some libs in special cases).
Maybe you can try the second solution?