Getting dependencies error while installing ViZDoom - python

I am trying to install ViZDoom on Ubuntu system. I am following the steps given the following link https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md.
However, I am getting the following error:
Collecting vizdoom
Using cached https://files.pythonhosted.org/packages/2d/6c/23565c09387173423883e7881fce53541ff89b5209ca0904c67e577dd6ac/vizdoom-1.1.7.tar.gz
Collecting numpy (from vizdoom)
Using cached https://files.pythonhosted.org/packages/3d/fc/4763e5f17ac6e7e7d55f377cde859ca1c5d5ac624441ab45315bc578aa9e/numpy-1.18.3-cp36-cp36m-manylinux1_x86_64.whl
Building wheels for collected packages: vizdoom
Running setup.py bdist_wheel for vizdoom ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-n60bvxmm/vizdoom/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/tmpynt30bvbpip-wheel- --python-tag cp36:
running bdist_wheel
running build
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.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
-- 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 Boost: /usr/include (found version "1.67.0") found components: filesystem thread system date_time chrono regex iostreams atomic
CMake Deprecation Warning at cmake_modules/CreateLaunchers.cmake:48 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/vizdoom/CMakeLists.txt:13 (include)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using internal bzip2 library
-- Using internal gme library
-- Performing Test HAVE_NO_ARRAY_BOUNDS
-- Performing Test HAVE_NO_ARRAY_BOUNDS - Success
-- Performing Test __LIBGME_TEST_VISIBILITY
-- Performing Test __LIBGME_TEST_VISIBILITY - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - 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 char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- /usr/include
-- /tmp/pip-build-n60bvxmm/vizdoom/src/vizdoom/bzip2
-- /tmp/pip-build-n60bvxmm/vizdoom/src/vizdoom/lzma/C
-- Looking for itoa
-- Looking for itoa - not found
-- Performing Test DUMB_CAN_USE_SSE
-- Performing Test DUMB_CAN_USE_SSE - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gtk+-2.0'
-- No package 'gtk+-2.0' found
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindSDL2.cmake:179 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/vizdoom/src/CMakeLists.txt:206 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-build-n60bvxmm/vizdoom/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-build-n60bvxmm/vizdoom/CMakeFiles/CMakeError.log".
Installation failed, you may be missing some dependencies.
Please check https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md for details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-n60bvxmm/vizdoom/setup.py", line 119, in <module>
keywords=['vizdoom', 'doom', 'ai', 'deep learning', 'reinforcement learning', 'research']
File "/home/rishabh29/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/rishabh29/.local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-n60bvxmm/vizdoom/setup.py", line 81, in run
subprocess.check_call(['cmake'] + cmake_arg_list)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DPYTHON_EXECUTABLE=/usr/bin/python3.6', '-DBUILD_PYTHON3=ON']' returned non-zero exit status 1.
When I try to install the ZDoom dependencies, I get the following error:
E: Unable to locate package libsdl2-dev
E: Unable to locate package nasm
E: Unable to locate package libbz2-dev
E: Package 'libgtk2.0-dev' has no installation candidate
E: Package 'cmake' has no installation candidate
E: Unable to locate package libfluidsynth-dev
E: Unable to locate package libgme-dev
E: Unable to locate package libopenal-dev
E: Unable to locate package timidity
E: Unable to locate package libwildmidi-dev
I think that there is CMake error or some version mismatch error but being new to it, I am unable to resolve it. Any help is appreciated.
Thanks!

Related

numpy error while installing ninja using pip

I am trying to install scipy but run into an error when installing ninja. I have no idea what it means.
pip install ninja
Output:
error: subprocess-exited-with-error
× Building wheel for ninja (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [56 lines of output]
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-uqf_okg8/ninja_2e64af0719684abb933d58ab1744c650/_cmake_test_compile/build
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 412, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 32, in <module>
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 637, in setup
env = cmkr.configure(
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 295, in configure
cmd.append(prefix + "_NumPy_INCLUDE_DIRS:PATH=" + np.get_include())
AttributeError: module 'numpy' has no attribute 'get_include'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ninja ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Things I tried:
update pip (pip install --upgrade pip, Can't install Scipy through pip)
reinstall numpy
You can try to pip specific version of ninja(That was work for
me.), if you didn't.
Downgrade your pip version pip install pip==21.3.1.You can see here all PIP versions are listed out there any try one by one If You don’t want to use 21.3.1. and by downgrading pip your error will be fixed.
You should update the pyproject.toml and try
again, it should work fine.

why I could not install dlib

I was trying to install dlib but I couldn't install this.
Please help. I am getting error while installing dlib.
I am not able to install this, Please help me out to install this.
I did research on it but I couldn't get it. can anyone help me to solve this...
Error:
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
WARNING: Ignoring invalid distribution -pencv-python (c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages)
Installing collected packages: dlib
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [122 lines of output]
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.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=c:\users\manoj\appdata\local\programs\python\python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\build\lib.win-amd64-3.9 -A x64'
-- Building for: Visual Studio 10 2010
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Detecting C compiler ABI info
CMake Warning in C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/CMakeLists.txt:
The binary and/or source directory paths may be too long to generate Visual
Studio 10 files for this project. Consider choosing shorter directory
names to build this project with Visual Studio 10. A more detailed
explanation follows.
There is a bug in the VS 10 IDE that renders property dialog fields blank
for files referenced by full path in the project file. However, CMake must
reference at least one file by full path:
C:/Users/Manoj/AppData/Local/Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCCompilerABI.c
This is because some Visual Studio tools would append the relative path to
the end of the referencing directory path, as in:
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/../../../../../../../../Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCCompilerABI.c
and then incorrectly complain that the file does not exist because the path
length is too long for some internal buffer or API. To avoid this problem
CMake must use a full path for this file which then triggers the VS 10
property dialog bug.
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
CMake Warning in C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/CMakeLists.txt:
The binary and/or source directory paths may be too long to generate Visual
Studio 10 files for this project. Consider choosing shorter directory
names to build this project with Visual Studio 10. A more detailed
explanation follows.
There is a bug in the VS 10 IDE that renders property dialog fields blank
for files referenced by full path in the project file. However, CMake must
reference at least one file by full path:
C:/Users/Manoj/AppData/Local/Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp
This is because some Visual Studio tools would append the relative path to
the end of the referencing directory path, as in:
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/../../../../../../../../Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp
and then incorrectly complain that the file does not exist because the path
length is too long for some internal buffer or API. To avoid this problem
CMake must use a full path for this file which then triggers the VS 10
property dialog bug.
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/Manoj/AppData/Local/Programs/Python/Python39/python.exe (found version "3.9.5")
-- Found PythonLibs: C:/Users/Manoj/AppData/Local/Programs/Python/Python39/libs/Python39.lib
-- pybind11 v2.2.4
-- Using CMake version: 3.22.4
-- Compiling dlib version: 19.24.0
CMake Error at C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/set_compiler_specific_options.cmake:31 (message):
C++11 is required to use dlib, but the version of Visual Studio you are
using is too old and doesn't support C++11. You need Visual Studio 2015 or
newer.
Call Stack (most recent call first):
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/test_for_sse4/CMakeLists.txt:8 (include)
CMake Error at C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/check_if_sse4_instructions_executable_on_host.cmake:13 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/set_compiler_specific_options.cmake:13 (include)
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 222, in <module>
setup(
File "c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=c:\\users\\manoj\\appdata\\local\\programs\\python\\python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -pencv-python (c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages)
WARNING: You are using pip version 22.0.2; however, version 22.1.1 is available.
You should consider upgrading via the 'c:\users\manoj\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
Please help. I am getting error while installing dlib.
I am not able to install this, Please help me out to install this.
I did research on it but I couldn't get it. can anyone help me to solve this...

Running CMAKE couldn't find python executable

Link for the issue raised in github: github issue link for reference
Application Version: CURA 3.6 version
Platform:
Processor: Intel(R) Core(TM) i5-8300H CPU # 2.30 GHz
RAM: 16.0 GB
System type: 64-bit Operating system, x64-based processor
Steps to Reproduce
I am trying to run source from https://github.com/Ultimaker/Cura/wiki/Running-Cura-from-Source-on-Windows#microsoft-visual-studio-2019.
And attempting to run step 10.
10:
Open CMake and point its source directory to your cura-build repository and the build directory to the build subdirectory.
Actual Results
D:\work\cura-build-master\cura-build-master\build>cmake -DCMAKE_INSTALL_PREFIX=../install_dir -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/MicrosoftVisualStudio14.0/VC/bin/amd64/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: D:/MicrosoftVisualStudio14.0/VC/bin/amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPython/Support.cmake:2966 (find_package_handle_standard_args)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPython3.cmake:389 (include)
CMakeLists.txt:94 (find_package)
-- Configuring incomplete, errors occurred!
See also "D:/work/cura-build-master/cura-build-master/build/CMakeFiles/CMakeOutput.log".
Expected results
CMake should generate all files in build directory.
From the above error it is evident that the CMake is not able to find python executable.
I have no python installed on system. The only python available is from the CURA (which is installed when the cura-build-environment is build). How to link or make the CMake find the python executable which is installed?
For my case it is installed/found the executable in this folder:
\cura-build-environment-master\install_dir\bin
I have checked and found that we can set the python executable:
for windows:
set(Python3_EXECUTABLE D:/cura-build-environment-master/install_dir/bin/python.exe)

installing cgal-swig-bindings with Mac Mojave and brew, after that getting the Error Symbol not found: _PyClass_Type

I try to use cgal-swig-bindings in this way:
i installed cmake 3.17.0 and brew
>>brew install cgal
>>brew install swig
>>cmake -DCGAL_DIR=/usr/local/lib/cmake/CGAL -DBUILD_JAVA=OFF -DPYTHON_LIBRARIES=/usr/local/bin/python3
then I got the following:
cmake -DCGAL_DIR=/usr/local/lib/cmake/CGAL -DBUILD_JAVA=OFF -DPYTHON_LIBRARIES=/usr/local/bin/python3
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /Library/Developer/CommandLineTools/usr/bin/c++ compiler.
-- DARWIN_VERSION=18
-- Mac Leopard detected
-- Found GMP: /usr/local/lib/libgmp.dylib
-- Found MPFR: /usr/local/lib/libmpfr.dylib
-- Found Boost: /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found suitable version "1.72.0", minimum required is "1.48")
-- Boost include dirs: /usr/local/include
-- Boost libraries:
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found SWIG: /usr/local/bin/swig (found version "4.0.1")
-- Build type:
-- USING CXXFLAGS = ' '
-- USING EXEFLAGS = ' '
-- Requested component: ImageIO
-- Requested component: MPFR
-- Requested component: GMP
-- NOTICE: Intel TBB was not found. Parallelism will be disabled.
-- BUILD_RUBY is set to OFF: no CGAL-bindings for Ruby will be generated.
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10")
-- BUILD_JAVA is set to OFF: no CGAL-bindings for Java will be generated.
-- Found Python libs.
-- CGAL-SWIG Python files and libraries will be written in /Users/karinstaring/Documents/cgal-swig-bindings/build-python/CGAL.
-- Now adding packages
-- NOTICE : LAS IO requires LASlib and will not be available.
-- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.3.7", minimum required is "3.1.0")
CMake Warning at /usr/local/lib/cmake/boost_serialization-1.72.0/libboost_serialization-variant-shared.cmake:64 (message):
Target Boost::serialization already has an imported location
'/usr/local/lib/libboost_serialization-mt.dylib', which will be overwritten
with '/usr/local/lib/libboost_serialization.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_serialization-1.72.0/boost_serialization-config.cmake:57 (include)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/Applications/CMake.app/Contents/share/cmake-3.17/Modules/FindBoost.cmake:444 (find_package)
SWIG_CGAL/Classification/CMakeLists.txt:5 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_iostreams-1.72.0/libboost_iostreams-variant-shared.cmake:64 (message):
Target Boost::iostreams already has an imported location
'/usr/local/lib/libboost_iostreams-mt.dylib', which will be overwritten
with '/usr/local/lib/libboost_iostreams.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_iostreams-1.72.0/boost_iostreams-config.cmake:57 (include)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/Applications/CMake.app/Contents/share/cmake-3.17/Modules/FindBoost.cmake:444 (find_package)
SWIG_CGAL/Classification/CMakeLists.txt:5 (find_package)
-- Found Boost: /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0") found components: serialization iostreams
-- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.3.7", minimum required is "3.2.0")
CMake Warning at /usr/local/lib/cmake/CGAL/CGAL_enable_end_of_configuration_hook.cmake:99 (message):
=======================================================================
CGAL performance notice:
The variable CMAKE_BUILD_TYPE is set to "". For performance reasons, you
should set CMAKE_BUILD_TYPE to "Release".
Set CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE to TRUE if you want to disable
this warning.
=======================================================================
Call Stack (most recent call first):
CMakeLists.txt:9223372036854775807 (CGAL_run_at_the_end_of_configuration)
-- Configuring done
-- Generating done
after this I run in the terminal: >> make
In file included from /usr/include/python2.7/Python.h:94:
/usr/include/python2.7/stringobject.h:173:5: warning: 'register' storage class specifier is deprecated and incompatible with
C++17 [-Wdeprecated-register]
register PyObject *obj, /* string or Unicode object */
^~~~~~~~~
/usr/include/python2.7/stringobject.h:174:5: warning: 'register' storage class specifier is deprecated and incompatible with
C++17 [-Wdeprecated-register]
register char **s, /* pointer to buffer variable */
^~~~~~~~~
/usr/include/python2.7/stringobject.h:175:5: warning: 'register' storage class specifier is deprecated and incompatible with
C++17 [-Wdeprecated-register]
register Py_ssize_t *len /* pointer to length variable or NULL
^~~~~~~~~
after this, I run a test file in python and I get the following error:
Traceback (most recent call last):
File "/.../Documents/cgal-swig-bindings/examples/python/test_aabb.py", line 4, in <module>
from CGAL.CGAL_Kernel import Point_3
File "/.../Documents/cgal-swig-bindings/build-python/CGAL/CGAL_Kernel.py", line 15, in <module>
from . import _CGAL_Kernel
ImportError: dlopen(/.../Documents/cgal-swig-bindings/build-python/CGAL/_CGAL_Kernel.so, 2): Symbol not found: _PyClass_Type
Referenced from: /.../Documents/cgal-swig-bindings/build-python/CGAL/_CGAL_Kernel.so
Expected in: flat namespace
in /.../Documents/cgal-swig-bindings/build-python/CGAL/_CGAL_Kernel.so
I tried the following from Can't compile C program on a Mac after upgrade to Mojave, but it did not help:
>> open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
the same applies when building cgal-swig-bindings in the following way:
git clone https://github.com/cgal/cgal-swig-bindings
cd cgal-swig-bindings
mkdir build/CGAL-5.0_release -p
cd build/CGAL-5.0_release
cmake -DCGAL_DIR=/usr/lib/CGAL -DBUILD_JAVA=OFF -DPYTHON_OUTDIR_PREFIX=../../examples/python ../.
I hope someone knows what the problem is or suggestions which things to check?
I installed python with brew and followed this https://github.com/davisking/dlib/issues/889 and included this
>>>cmake -DCGAL_DIR=/usr/local/lib/cmake/CGAL -DBUILD_JAVA=OFF -DPYTHON_LIBRARIES=/usr/local/lib/python3.7 -DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib -DPython_FRAMEWORKS=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Headers
this worked for me!

Error compiling dlib on os x

I'm trying to compile dlib on my computer (OS X 10.10) but am running into an error I'm not sure how to fix. When I run CMake I get this output
Configuring cmake ...
-- The C compiler identification is AppleClang 7.0.0.7000176
-- The CXX compiler identification is AppleClang 7.0.0.7000176
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- python
CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required
is at least "3.4" (found PYTHON_LIBRARY-NOTFOUND)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPythonLibs.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/Users/gabriel/Devspace/dlib/dlib/add_python_module:64 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/gabriel/Devspace/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
error: cmake configuration failed!
First of all I'm wondering how CMake could not find Boost but then in the next line give the version of boost I currently have installed on my computer? Second, I'm wondering how I go about fixing the pythonlibs error? I've tried Googling around but mainly have just found other people with similar errors but not what it means or how to fix it. Any help would be greatly appreciated. Thanks
Is that your boost installed with python 3?If so, I suggest you to set your default python version 3.x, or reinstall boost with the current python version like this:
To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder and run these commands:
./bootstrap.sh --with-libraries=python
./b2
sudo ./b2 install
I've solved the problem Could NOT find Boost with the above solution.

Categories