why I could not install dlib - python

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...

Related

Cannot install PyGame in PyCharm No setup file exists [duplicate]

This question already has answers here:
How to install pygame?
(4 answers)
Unable to install Pygame using pip
(27 answers)
Closed 11 days ago.
I am trying to install PyGame on PyCharm.
History:
clicked on File -> New projects setup -> settings for new project -> selected python -> click on "+" -> searched "pygame" on search bar -> install package -> ERROR
but I am getting this error:
Collecting pygame
Using cached pygame-2.1.2.tar.gz (10.1 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[77 lines of output]
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\setup.py", line 359, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\buildconfig\config.py", line 225, in main
deps = CFG.main(**kwds)
^^^^^^^^^^^^^^^^
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\buildconfig\config_win.py", line 511, in main
return setup_prebuilt_sdl2(prebuilt_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(...)
File "C:\Users\Lorak\PycharmProjects\gameproject\venv\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(...)
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip`
I don't know how to fit it :(
I tried to install other versions, but there is no difference. Still getting error.
I also tried do it via terminal, but when I use "pip install pygame" another error jumps telling me that "pip is not recognized". I don't know if this is same or other error. I tried to find info on the internet but there is nothing even similar to this error. I have also tried to update pip via manual and it worked, but I am still getting the same error.

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.

Getting errors while installing streamlit usin pip in

I am getting the following error while installing streamlit using pip.
How do i fix this.
Is there an alternative way i can download streamlit?
I deleted a few lines of code due to ease of understanding
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python38-32\python.exe' 'c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\dell\AppData\Local\Temp\tmp98zgcj_w'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-
copying pyarrow\tests\parquet\test_parquet_writer.py -> build\lib.win32-3.8\pyarrow\tests\parquet
running build_ext
creating C:\Users\dell\AppData\Local\Temp\pip-install-8d7399fc\pyarrow_54eefc0597024fa083b65739386c1def\build\temp.win32-3.8
Traceback (most recent call last):
cmd_obj.run()
File "setup.py", line 92, in run
self._run_cmake()
File "setup.py", line 280, in _run_cmake
raise RuntimeError('Not supported on 32-bit Windows')
RuntimeError: Not supported on 32-bit Windows
----------------------------------------
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
So based on this error message you're using 32-bit Python?
Pyarrow only works for 64 bit operating systems and, therefore, Streamlit became 64 bit dependant after we added this as a dependancy in Streamlit version 0.63!
Is 32 over 64 bit intentional? If not, your hardware system is most likely 64-bit (if it was made in the last 10 years), and switching to 64-bit Python should resolve the error message.
Marisa

Getting dependencies error while installing ViZDoom

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!

Wheel built with MSVC Cython extension cannot find module

I'm attempting to switch from a GNU + mingwpy to an MSVC toolchain to build my wheel, which includes a Cython wrapper around a binary.
I've built the external DLL with an MSVC toolchain in Appveyor, and, also in Appveyor, I've got the wheel build step working. After the build step completes, I'm testing by doing the following:
installing and activating a clean virtualenv
installing dependencies
installing the wheel I just built
running nosetests wheelname
However, this is now failing:
======================================================================
ERROR: Failure: ImportError (No module named cutil)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Miniconda\envs\test_env\lib\site-packages\nose\loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "C:\Miniconda\envs\test_env\lib\site-packages\nose\importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "C:\Miniconda\envs\test_env\lib\site-packages\nose\importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "C:\projects\simplification\simplification\test\test.py", line 5, in <module>
from simplification.cutil import simplify_coords as csimplify_coords
ImportError: No module named cutil
----------------------------------------------------------------------
see full traceback
Running dumpbin /dependents on cutil.pyd seems to show what I expected:
Dump of file simplification/cutil.pyd
File Type: DLL
Image has the following dependencies:
rdp.dll
python27.dll
MSVCR90.dll
KERNEL32.dll
Summary
4000 .data
2000 .rdata
3000 .reloc
12000 .text
Where rdp.dll is the external binary I'm wrapping with Cython.
What's going wrong here?
Update: My module can also import the binary using Ctypes, and when I disable the Cython-specific imports and tests in my test script, everything works. So I know my external binary is OK. I'm still confused as to why the import is failing, especially as the Cython build step of cutil.pyd completes, and dumpbin says it's looking for its rdp.dll dependency in the right place (i.e. in the same directory).
Update 2: Running dumpbin on cutil.pyd that's been built with a GNU toolchain gives the following:
Dump of file simplification/cutil.pyd
File Type: DLL
Image has the following dependencies:
msvcr90.dll
python27.dll
KERNEL32.dll
USER32.dll
rdp.dll
Summary
1000 .CRT
1000 .bss
3000 .data
1000 .edata
2000 .idata
1000 .pdata
4000 .rdata
1000 .reloc
1000 .rsrc
1E000 .text
1000 .tls
1000 .xdata
But I have no idea whether the dependency order is significant or whether the metadata in the Summary section matters
This seems to be an issue with the virtualenv installed by Conda. I have no idea how to fix it, so I stopped using a virtualenv installed by conda.

Categories