I'm trying to boot up an ubuntu ec2 instance and I need dlib installed. I am trying to use the command pip install dlib and the installation is breaking.
I'm using a Ubuntu deep learning AMI because it has cv2 and other package I need already installed. I started with a p2.large but moved to a p2.xlarge because this post recommended getting more RAM to install dlib.
How to install pip2 on kali?
However, this did not work.
Any ideas?
Here's the error message:
Collecting dlib
Using cached dlib-19.21.1.tar.gz (3.6 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/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-dj_f226q
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (537 lines):
running bdist_wheel
running build
running build_py
package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
-- Found system copy of libpng: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpng.so;/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libz.so
-- Found system copy of libjpeg: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libjpeg.so
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Checking for module 'lapack'
-- Found lapack, version 3.10.3
-- Looking for cblas_ddot
-- Looking for cblas_ddot - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found Intel MKL BLAS/LAPACK library
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
-- Found CUDA: /usr/local/cuda-10.1 (found suitable version "10.1", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: /usr/local/cuda/lib64/libcudnn.so
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- Building a cuDNN test project to check if you have the right version of cuDNN installed...
-- Enabling CUDA support for dlib. DLIB WILL USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6
Invoking CMake build: 'cmake --build . --config Release -- -j32'
[ 1%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o
[ 2%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cuda_dlib.cu.o
/home/ubuntu/anaconda3/envs/pytorch_p36/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/type_traits(177): error: "conjunction_v" is not a function or static data member
----------------------------------------
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/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-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (539 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
Building extension for Python 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00017e17_00000000-6_cusolver_dlibapi.cpp1.ii".
Compilation terminated.
CMake Error at dlib_generated_cusolver_dlibapi.cu.o.Release.cmake:280 (message):
Error generating file
/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6/dlib_build/CMakeFiles/dlib.dir/cuda/./dlib_generated_cusolver_dlibapi.cu.o
dlib_build/CMakeFiles/dlib.dir/build.make:89: recipe for target 'dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o' failed
make[2]: *** [dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o] Error 1
CMakeFiles/Makefile2:162: recipe for target 'dlib_build/CMakeFiles/dlib.dir/all' failed
make[1]: *** [dlib_build/CMakeFiles/dlib.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 262, in <module>
'Topic :: Software Development',
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 135, in run
self.build_extension(ext)
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 175, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j32']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/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-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -m pip install --upgrade pip' command.
Using following combination is one of the possible option;
Amazon Machine Image (a.k.a. ami) = ami-0949532e81c9eab21 (i.e. Deep Learning AMI (Ubuntu 16.04) Version 38.0)
AWS EC2 Instance Type = p2.xlarge
Related
I want to install the BGSLibrary (https://pypi.org/project/pybgs/) but I have an error. I don't know what to do...
Here is the error :
(base) C:\Users\qh742176>pip install pybgs
Collecting pybgs
Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
Building wheel for pybgs (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\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\qh742176\AppData\Local\Temp\pip-wheel-hlpvbn7p'
cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
Complete output (7 lines):
running bdist_wheel
running build
running build_ext
Preparing the build environment
Configuring cmake project
cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
error: command 'cmake' failed: No such file or directory
----------------------------------------
ERROR: Failed building wheel for pybgs
Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
Running setup.py install for pybgs ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\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\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
Complete output (7 lines):
running install
running build
running build_ext
Preparing the build environment
Configuring cmake project
cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
error: command 'cmake' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\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\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.
I have python with Anaconda.
Python 3.8.8
UPDATE :
I didn't download OpenCV neither Visual Studio.
Now I have Visual Studio Community 2019 and OpenCV 4.5.2.
But now during the Building binaries I have this error : MSBUILD : error MSB001 : Unknow switch.
Here is the error :
(base) C:\Users\quent>pip install pybgs
Collecting pybgs
Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
Building wheel for pybgs (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\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\quent\AppData\Local\Temp\pip-wheel-ao02fvnp'
cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
Complete output (61 lines):
running bdist_wheel
running build
running build_ext
Preparing the build environment
Configuring cmake project
C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.28.29915.0
-- The CXX compiler identification is MSVC 19.28.29915.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
-- BGS_PYTHON_SUPPORT: ON
-- BGS_PYTHON_ONLY: ON
-- BGS_CORE_STATIC: ON
-- PYTHON VERSION: 3.8
-- OpenCV ARCH: x64
-- OpenCV RUNTIME: vc15
-- OpenCV STATIC: OFF
-- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
-- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
-- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
--
-- OpenCV library status:
-- version: 4.5.2
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
-- include path: C:/Users/quent/Downloads/opencv/build/include
-- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
-- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
-- pybind11 v2.3.dev1
--
-- Python library status:
-- executable: C:/ProgramData/Anaconda3/python.exe
-- library:
-- include path: C:/ProgramData/Anaconda3/include
-- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include
-- Bulding bgslibrary_core STATIC
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
Building binaries
C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.
MSBUILD : error MSB1001: Commutateur inconnu.
Commutateurÿ:ÿ-j8
Pour la syntaxe du commutateur, tapez "MSBuild -help"
error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pybgs
Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
Running setup.py install for pybgs ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\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\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
Complete output (61 lines):
running install
running build
running build_ext
Preparing the build environment
Configuring cmake project
C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.28.29915.0
-- The CXX compiler identification is MSVC 19.28.29915.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
-- BGS_PYTHON_SUPPORT: ON
-- BGS_PYTHON_ONLY: ON
-- BGS_CORE_STATIC: ON
-- PYTHON VERSION: 3.8
-- OpenCV ARCH: x64
-- OpenCV RUNTIME: vc15
-- OpenCV STATIC: OFF
-- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
-- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
-- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
--
-- OpenCV library status:
-- version: 4.5.2
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
-- include path: C:/Users/quent/Downloads/opencv/build/include
-- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
-- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
-- pybind11 v2.3.dev1
--
-- Python library status:
-- executable: C:/ProgramData/Anaconda3/python.exe
-- library:
-- include path: C:/ProgramData/Anaconda3/include
-- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include
-- Bulding bgslibrary_core STATIC
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
Building binaries
C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.
MSBUILD : error MSB1001: Commutateur inconnu.
Commutateurÿ:ÿ-j8
Pour la syntaxe du commutateur, tapez "MSBuild -help"
error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\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\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.
error: command 'cmake' failed: No such file or directory
you dont have CMake installed or its not available in PATH when you try to install pybgs.
https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions---Windows clearly indicates that you need:
* OpenCV 2.4.x, 3.4.x, 4.x
* Visual Studio 2013, 2015, 2017
* CMake 3.12 or higher
if you have those installed, you probably need to activate dev prompt for visual studio..
I am trying to install the requirements of face recognition python api on webserver but it is giving me error in last , below is the list of requirements
certifi==2019.9.11
chardet==3.0.4
Click==7.0
cmake==3.15.3
dlib==19.18.0
face-recognition==1.2.3
face-recognition-models==0.3.0
Flask==1.1.1
Flask-Cors==3.0.8
idna==2.8
itsdangerous==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
numpy==1.17.2
opencv-python==4.1.1.26
Pillow==6.2.0
psycopg2==2.8.3
requests==2.22.0
six==1.12.0
urllib3==1.25.6
Werkzeug==0.16.0
I have tried to run this on local and it is working fine but when I try to run it on ubuntu webserver then it is giving error while installing the requirements.
here below is the error
ERROR: Command errored out with exit status 1:
Running setup.py install for dlib ... 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-unk5_9mx/dlib/setup.py'"'"'; __file__='"'"'/tmp/pip-ins_file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lt8xrcl0/insle --install-headers /home/ubuntu/.local/include/python3.5m/dlib
cwd: /tmp/pip-install-unk5_9mx/dlib/
Complete output (222 lines):
running install
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.5.2 (default, Oct 7 2020, 17:19:02)
Invoking CMake setup: 'cmake /tmp/pip-install-unk5_9mx/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-unk5_9mx/dlib/build/lib.linux-x86_64
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found version "3.5.2")
-- Found PythonLibs: python3.5m
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.2
-- Using CMake version: 3.15.3
-- Compiling dlib version: 19.18.0
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found system copy of libjpeg: /usr/lib/x86_64-linux-gnu/libjpeg.so
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found LAPACK library
-- Found BLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
-- Looking for sgesv
-- Looking for sgesv - not found
-- Looking for sgesv_
-- Looking for sgesv_ - found
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
-- DID NOT FIND CUDA
-- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-unk5_9mx/dlib/build/temp.linux-x86_64-3.5
Invoking CMake build: 'cmake --build . --config Release -- -j1'
Scanning dependencies of target dlib
[ 0%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
[ 1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
[ 2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
[ 3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
[ 4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
[ 5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
[ 5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
[ 6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
[ 7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
[ 8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
[ 9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o
[ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o
[ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o
[ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o
[ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/filtering/kalman_filter.cpp.o
[ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/test_for_odr_violations.cpp.o
[ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/svm/auto.cpp.o
[ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o
[ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o
[ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o
[ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o
[ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o
[ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o
[ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o
[ 21%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o
[ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o
[ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o
[ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o
[ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o
[ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o
[ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o
[ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o
[ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o
[ 28%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o
[ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o
[ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o
[ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o
[ 32%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o
[ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o
[ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o
[ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o
[ 35%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/async.cpp.o
[ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o
[ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o
[ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/cpu_dlib.cpp.o
[ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/tensor_tools.cpp.o
[ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o
[ 40%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o
[ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/drawable.cpp.o
[ 42%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/canvas_drawing.cpp.o
[ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/style.cpp.o
[ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/base_widgets.cpp.o
[ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_1.cpp.o
[ 45%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_2.cpp.o
[ 46%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/arm/arm_init.c.o
[ 47%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/arm/filter_neon_intrinsics.c.o
[ 48%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/png.c.o
[ 49%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngerror.c.o
[ 50%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngget.c.o
[ 50%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngmem.c.o
[ 51%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngpread.c.o
[ 52%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngread.c.o
[ 53%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngrio.c.o
[ 54%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngrtran.c.o
[ 55%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngrutil.c.o
[ 55%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngset.c.o
[ 56%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngtrans.c.o
[ 57%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngwio.c.o
[ 58%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngwrite.c.o
[ 59%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngwtran.c.o
[ 60%] Building C object dlib_build/CMakeFiles/dlib.dir/external/libpng/pngwutil.c.o
[ 61%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/adler32.c.o
[ 61%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/compress.c.o
[ 62%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/crc32.c.o
[ 63%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/deflate.c.o
[ 64%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/gzclose.c.o
[ 65%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/gzlib.c.o
[ 66%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/gzread.c.o
[ 66%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/gzwrite.c.o
[ 67%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/infback.c.o
[ 68%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/inffast.c.o
[ 69%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/inflate.c.o
[ 70%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/inftrees.c.o
[ 71%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/trees.c.o
[ 72%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/uncompr.c.o
[ 72%] Building C object dlib_build/CMakeFiles/dlib.dir/external/zlib/zutil.c.o
[ 73%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.cpp.o
[ 74%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_png.cpp.o
[ 75%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o
[ 76%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_jpeg.cpp.o
[ 77%] Linking CXX static library libdlib.a
[ 77%] Built target dlib
Scanning dependencies of target dlib_python
[ 77%] Building CXX object CMakeFiles/dlib_python.dir/src/dlib.cpp.o
In file included from /tmp/pip-install-unk5_9mx/dlib/dlib/external/pybind11/include/pybind11/pytypes.h:12:0,
from /tmp/pip-install-unk5_9mx/dlib/dlib/external/pybind11/include/pybind11/cast.h:13,
from /tmp/pip-install-unk5_9mx/dlib/dlib/external/pybind11/include/pybind11/attr.h:13,
from /tmp/pip-install-unk5_9mx/dlib/dlib/external/pybind11/include/pybind11/pybind11.h:43,
from /tmp/pip-install-unk5_9mx/dlib/dlib/../dlib/python/pybind_utils.h:6,
from /tmp/pip-install-unk5_9mx/dlib/dlib/../dlib/python.h:6,
from /tmp/pip-install-unk5_9mx/dlib/tools/python/src/opaque_types.h:6,
from /tmp/pip-install-unk5_9mx/dlib/tools/python/src/dlib.cpp:4:
/tmp/pip-install-unk5_9mx/dlib/dlib/external/pybind11/include/pybind11/detail/common.h:111:20: fatal error: Python.h: No such file or directory
compilation terminated.
CMakeFiles/dlib_python.dir/build.make:62: recipe for target 'CMakeFiles/dlib_python.dir/src/dlib.cpp.o' failed
make[2]: *** [CMakeFiles/dlib_python.dir/src/dlib.cpp.o] Error 1
CMakeFiles/Makefile2:80: recipe for target 'CMakeFiles/dlib_python.dir/all' failed
make[1]: *** [CMakeFiles/dlib_python.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-unk5_9mx/dlib/setup.py", line 261, in <module>
'Topic :: Software Development',
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
self.run_command('build')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-unk5_9mx/dlib/setup.py", line 135, in run
self.build_extension(ext)
File "/tmp/pip-install-unk5_9mx/dlib/setup.py", line 175, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j1']' returned non-zero exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-unk5_9mx/dlib/setup.pytokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --re-managed --user --prefix= --compile --install-headers /home/ubuntu/.local/include/python3.5m/dlib Check the logs for full command output.
My Env details for reference :
python 3.7 &
ubuntu 16.04
1) Assign root permission and update ubuntu first
sudo su
apt-get update
2) Check your version & path for python & pip.
which python3
python3 -V
which pip3
pip3 -V
3)
pip3 install cmake
4)
apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
grapgicsmagick \
libgraphicsmagic-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
software-properties-common \
zip
6)
apt-get install python3-dev
5)
pip3 install dlib
✅ Done
then install your requirement.txt and remove dlib from it
Installing numba and llvmlite Python on Windows 10 failure
I have tried to install Python numba on Windows 10 using
pip install numba
with partial success, but a failure installing llvmlite
Requirement already satisfied: numpy>=1.15 in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (1.19.2+mkl)
Requirement already satisfied: setuptools in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (49.2.1)
Building wheels for collected packages: numba, llvmlite
Building wheel for numba (setup.py) ... done
Created wheel for numba: filename=numba-0.51.2-cp39-cp39-win_amd64.whl size=2173229 sha256=249a12f2e1436ac244e2730f6e7ddb5bd53413460dcbdc4ed4e6aeebbf16d6ce
Stored in directory: c:\users\paul\appdata\local\pip\cache\wheels\0a\51\41\9f5a61bcd9d25271d7021e05cbabcd574fb3d534d07654b780
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
CMake Error at CMakeLists.txt:9 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
Doesn't know where LLVM is installed?
So I used Windows Environment editor to add LLVM_DIR with value C:\Program Files\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm
in the hope that it will use one of the four Clang versions that I have installed at C:\LLVM\clang-1100, C:\LLVM\clang-1000 ...
latest binary is C:\LLVM\clang-1100\LLVM\bin
I also have VS 1017 and 1019 installed, and all compilers are working OK from other IDEs and builds.
and downloaded the most recent wheel
llvmlite-0.34.0-cp39-cp39-win_amd64.whl
and added LLVM_DIR to system PATH
C:\Program Files\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm
This allows it to more nearly work, but fails using MSVC
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\ZERO_CHECK.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'D:\winlibs64_stage\custombuilt\lib\libffi.dll.a' [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
Trying generator 'Visual Studio 15 2017 Win64'
Traceback (most recent call last):
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 191, in <module>
main()
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 179, in main
main_win32()
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 94, in main_win32
subprocess.check_call(['cmake', '--build', build_dir, '--config', config])
File "c:\users\paul\appdata\local\programs\python\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', 'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\ffi\\build', '--config', 'Release']' returned non-zero exit status 1.
error: command 'c:\\users\\paul\\appdata\\local\\programs\\python\\python39\\python.exe' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paul\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\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\Paul\AppData\Local\Temp\pip-record-l4absc_g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paul\appdata\local\programs\python\python39\Include\llvmlite' Check the logs for full command output.
This suggests that the output folder location is not specified, or that VS incremental build option is not set to 'not used'.
Or that I should use an LLVM version, but I don't know how to specify which one, and not use VS2017.
Suggestions how to get out of this rabbit hole most welcome ;-)
Thanks
Paul
I wanted to install librosa but I get stack with this error, but I managed to solve it with this:
first I download the last version of llvmlite Here
than I run the following command:
pip install llvmlite-0.35.0-cp39-cp39-win_amd64.whl
next for all packages need by librosa I install them as follow:
pip install --no-deps packageName
or just for more sample do as follow :
pip install librosa --ignore-installed llvmlite
Problem description:
In VS Code, run the command pip install bpy (as indicated in https://pypi.org/project/bpy/) and get the following error message:
PS C:\Users\(...)\Local\Programs\Python\Python38> pip install bpy
Collecting bpy
Using cached bpy-0.0.0a0.tar.gz (19 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\(...)\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\(...)\\Local\\Temp\\pip-install-xln6pb4c\\bpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\(...)\\Local\\Temp\\pip-install-xln6pb4c\\bpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\(...)\Local\Temp\pip-pip-egg-info-0pdk7e9q'
cwd: C:\Users\(...)\Local\Temp\pip-install-xln6pb4c\bpy\
Complete output (16 lines):
Traceback (most recent call last):
File "c:\users\(...)\local\programs\python\python38\lib\tokenize.py", line 342, in find_cookie
codec = lookup(encoding)
LookupError: unknown encoding: future_fstrings
During handling of the above exception, another exception occurred:
File "<string>", line 1, in <module>
File "c:\users\(...)\local\programs\python\python38\lib\tokenize.py", line 394, in open
encoding, lines = detect_encoding(buffer.readline)
File "c:\users\(...)\local\programs\python\python38\lib\tokenize.py", line 381, in detect_encoding
encoding = find_cookie(second)
File "c:\users\(...)\local\programs\python\python38\lib\tokenize.py", line 350, in find_cookie
raise SyntaxError(msg)
SyntaxError: unknown encoding for 'C:\\Users\\(...)\\Local\\Temp\\pip-install-xln6pb4c\\bpy\\setup.py': future_fstrings
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. code here
------- What I tried (without success): -------
Installed wheels (pip install wheel), then downloaded the package from pypi.org to manually install:
pip install 'C:\Users(...)\Downloads\bpy-2.82.1.tar.gz'
got the same error.
------- Conclusion: -------
Cannot use bpy outside of Blender. I found some workarounds (which I have yet to try) on another post on Blender Stack Exchange
Thanks Anand and phd for the very useful links!
From what I understand it is actually possible to run bpy outside blender and information that claims otherwise was written for older versions. I have to admit though that I am still in progress of installing bpy which is not an easy task and I cannot verify this, yet.
In your case, a pip module is missing. You can install it with pip install future_fstrings. Have a look at https://pypi.org/project/bpy/ for more guidelines.
EDIT: I was able to install bpy under Windows and Linux. It throws some errors on Linux but works fine under Windows. And absolutely works standalone!
I used a lot of trial and error and found out that using a Python version of 3.7.6 and pip version of 20.2.4, I was able to install bpy version - 2.82.1 by pip install bpy. I am using Windows 10 and Anaconda prompt.
I guess you can't install bpy because you're installing bpy by python 3.8 version.
You have do downgrade your python version to 3.7
Check out https://pypi.org/project/bpy/
then you can see bpy module requires version of Python >=3.7, <3.8
TL:DR- install from prebuilt wheel, not from standard pip install bpy && bpy_post_install
Errors installing on macos:
I have been trying to install it for the last 8 hours or so.
My installation steps thus far:
I built the blender app from source, following instructions on blender.org
According to the bpy github repo- bpy depends upon bpy-build (though it's not in the prerequisites).
The bpy-build github repo doesn't have great installation instructions, and the setup.py script specifically declares the OS as windows. So, I basically just skipped this- a possible cause of the install failures.
In two different attempts, I used both pyenv and virtualenv, to create a python 3.7 dev environment. Both resulted in a hanging install for pip install bpy during the running of setup.py. The actual error from the pip install is:
Collecting bpy
Using cached https://files.pythonhosted.org/packages/4b/ed/ba6092b691acc5b157891421d9fde4a9dd5dcc8a8b93a4e8119fec261391/bpy-2.82.1.tar.gz
Installing collected packages: bpy
Running setup.py install for bpy ... error
ERROR: Command errored out with exit status 1:
command: /<path-to-venv>/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/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/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-record-ti3q9j4a/install-record.txt --single-version-externally-managed --compile --install-headers /<path-to-venv>/venv/include/site/python3.7/bpy
cwd: /private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/
Complete output (58 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/blenderpy
copying blenderpy/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
copying blenderpy/pre_uninstall.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
copying blenderpy/post_install.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
running build_ext
Preparing the build environment
Searching for compatible Blender online (this will take a while)
Found compatible Blender version 2.82
Cloning Blender source from git (this will take a while)
Cloning precompiled libs from svn (this will take a while)
cmake -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_MODULE=ON -DWITH_OPENMP=OFF -DWITH_AUDASPACE=OFF -S/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/build/temp.macosx-10.9-x86_64-3.7/blender -B/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/build/temp.macosx-10.9-x86_64-3.7/build
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected OS X 11.3 and Xcode 12. at /Applications/Xcode.app
-- OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
-- Setting deployment target to 10.11, lower versions are not supported
CMake Warning at CMakeLists.txt:580 (message):
WITH_OPENAL requires WITH_AUDASPACE which is disabled
CMake Warning at CMakeLists.txt:584 (message):
WITH_JACK requires WITH_AUDASPACE which is disabled
-- WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now
-- Performing Test SUPPORT_SSE_BUILD
-- Performing Test SUPPORT_SSE_BUILD - Success
-- SSE Support: detected.
-- Performing Test SUPPORT_SSE2_BUILD
-- Performing Test SUPPORT_SSE2_BUILD - Success
-- SSE2 Support: detected.
-- Found Git: /usr/bin/git (found version "2.30.1 (Apple Git-130)")
CMake Error at build_files/cmake/platform/platform_apple.cmake:38 (message):
Mac OSX requires pre-compiled libs at:
'/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/build/temp.macosx-10.9-x86_64-3.7/blender/../lib/darwin'
Call Stack (most recent call first):
CMakeLists.txt:808 (include)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeError.log".
error: command 'cmake' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /<path to venv>/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-install-m6rixhki/bpy/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/4n/wsjhxhbn0pb11r7cyqcvtxcc0000gn/T/pip-record-ti3q9j4a/install-record.txt --single-version-externally-managed --compile --install-headers /<path to venv>/venv/include/site/python3.7/bpy Check the logs for full command output.
**** The breakthrough ****
While writing this, I noticed the option in the bpy github page to install via pre-build wheel rather than the usual pip install bpy && bpy_post_install. You have to go to some 'sketchy' sites to download the file, but after I downloaded it and installed it that way I was able to run blender scripts outside of the blender app!!
Unfortunately the ‘bpy’ module cannot be used outside of Blender.
More details are here: https://creativepolygon.com/development/starting-with-bpy-blender-python-part-1-installation
I am trying to install a python package called osmium into a virtual environment that I created with venv. With the virtual environment activated and from the Scripts directory of the virtual environment, calling
pip install osmium
fails (error message below). I am using pycharm as an IDE. Attempting to install osmium via the IDE also fails.
Interestingly, I have a colleague with the identical computer and identical versions of python and pycharm who succeeded in installing osmium. He relied directly on the virtual environment created by pycharm (which, I think, uses virtualenv instead of venv), never using venv and had no problem.
I even went as far as reinstalling both python and pycharm to no avail. I wonder what's going on here. Why is this happening in the first place? And what is causing the failure even after reinstalling (do some traces of python and pycharm remain?)
The error message is:
D:\virtual_envs\test_env\Scripts>activate
(test_env) D:\virtual_envs\test_env\Scripts>pip install osmium
Collecting osmium
Using cached https://files.pythonhosted.org/packages/65/ec/41bc12a33bc9feab921e5e21999fe30882288f2f4f8d8a4536dcd03e2c0b/osmium-2.15.2.tar.gz
Installing collected packages: osmium
Running setup.py install for osmium ... error
Complete output from command d:\virtual_envs\test_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\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\J84120~1\AppData\Local\Temp\pip-record-torhb0ih\install-record.txt --single-version-externally-managed --compile --install-headers d:\virtual_envs\test_env\include\site\python3.7\osmium:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\osmium
copying src\osmium\version.py -> build\lib.win32-3.7\osmium
copying src\osmium\__init__.py -> build\lib.win32-3.7\osmium
creating build\lib.win32-3.7\osmium\osm
copying src\osmium/osm\mutable.py -> build\lib.win32-3.7\osmium/osm
copying src\osmium/osm\__init__.py -> build\lib.win32-3.7\osmium/osm
creating build\lib.win32-3.7\osmium\replication
copying src\osmium/replication\server.py -> build\lib.win32-3.7\osmium/replication
copying src\osmium/replication\utils.py -> build\lib.win32-3.7\osmium/replication
copying src\osmium/replication\__init__.py -> build\lib.win32-3.7\osmium/replication
running build_ext
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found Protozero: C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/contrib/protozero/include (found suitable version "1.6.7", minimum required is "1.5.1")
CMake Warning at cmake/FindOsmium.cmake:127 (message):
Osmium: Can not find some libraries for PBF input/output, please install
them or configure the paths.
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
-- Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Warning at cmake/FindOsmium.cmake:153 (message):
Osmium: Can not find some libraries for XML input/output, please install
them or configure the paths.
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
CMake Error at D:/virtual_envs/test_env/Lib/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Osmium (missing: ZLIB_FOUND EXPAT_FOUND BZIP2_FOUND) (found
suitable version "2.15.1", minimum required is "2.14")
Call Stack (most recent call first):
D:/virtual_envs/test_env/Lib/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOsmium.cmake:278 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 150, in <module>
zip_safe=False,
File "d:\virtual_envs\test_env\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "d:\virtual_envs\test_env\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 67, in run
self.build_extension(ext)
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 110, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\J84120~1
\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=d:\\virtual_envs\\test_env\\scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\build\\lib.win32-3.7', '-DOSMIUM_INCLUDE_DIR=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/libosmium/include', '-DPROTOZERO_INCLUDE_DIR=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/protozero/include', '-DPYBIND11_PREFIX=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/pybind11']' returned non-zero exit status 1.
----------------------------------------
Command "d:\virtual_envs\test_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\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\J84120~1\AppData\Local\Temp\pip-record-torhb0ih\install-record.txt --single-version-externally-managed --compile --install-headers d:\virtual_envs\test_env\include\site\python3.7\osmium" failed with error code 1 in C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(test_env) D:\virtual_envs\test_env\Scripts>
The problem lies in OS dependencies for development packages. From the documentation, you can get library names that you also see in your error message
sudo apt-get install build-essential cmake libboost-dev \
libexpat1-dev zlib1g-dev libbz2-dev
That command is for Debian-based distributions. So you have to find MS Windows versions
Bzip2
http://gnuwin32.sourceforge.net/packages/bzip2.htm
Zlib
http://gnuwin32.sourceforge.net/packages/zlib.htm
expat as NuGet package
https://www.nuget.org/api/v2/package/expat.v141/2.2.6
There is an option from ZeroC Ice for VisualStudio