Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python2.7 pip install dlib error #1337

Closed
Hurmean opened this issue May 31, 2018 · 18 comments
Closed

python2.7 pip install dlib error #1337

Hurmean opened this issue May 31, 2018 · 18 comments

Comments

@Hurmean
Copy link

Hurmean commented May 31, 2018

Collecting dlib
Using cached https://files.pythonhosted.org/packages/79/26/8ef2835606b4b37f704862b2db55edb89675daca0b82718244fca718cddd/dlib-19.13.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib: started
Running setup.py bdist_wheel for dlib: finished with status 'error'
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-lIh_fo/dlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-qnWYfi --python-tag cp27:
running bdist_wheel
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 2.7.12 (default, Dec 4 2017, 14:50:18)
Invoking CMake setup: 'cmake /tmp/pip-install-lIh_fo/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7 -DPYTHON_EXECUTABLE=/usr/bin/python -DCMAKE_BUILD_TYPE=Release'
-- 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/python (found version "2.7.12")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.2
CMake Error at CMakeLists.txt:17 (if):
if given arguments:

  "EQUAL" "0" "AND" "compile_result"

Unknown arguments specified

CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-lIh_fo/dlib/build/temp.linux-aarch64-2.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 256, in
'Topic :: Software Development',
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 133, in run
self.build_extension(ext)
File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 169, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-lIh_fo/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7', '-DPYTHON_EXECUTABLE=/usr/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1


Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-lIh_fo/dlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-sHrt4s/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib/init.py' not found (or not a regular file)
running build_ext
Building extension for Python 2.7.12 (default, Dec 4 2017, 14:50:18)
Invoking CMake setup: 'cmake /tmp/pip-install-lIh_fo/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7 -DPYTHON_EXECUTABLE=/usr/bin/python -DCMAKE_BUILD_TYPE=Release'
-- 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/python (found version "2.7.12")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.2
CMake Error at CMakeLists.txt:17 (if):
if given arguments:

    "EQUAL" "0" "AND" "compile_result"

  Unknown arguments specified


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-lIh_fo/dlib/build/temp.linux-aarch64-2.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 256, in <module>
    'Topic :: Software Development',
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-aarch64/egg/setuptools/command/install.py", line 61, in run
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 133, in run
    self.build_extension(ext)
  File "/tmp/pip-install-lIh_fo/dlib/setup.py", line 169, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-lIh_fo/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-lIh_fo/dlib/build/lib.linux-aarch64-2.7', '-DPYTHON_EXECUTABLE=/usr/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1

----------------------------------------
  • Version:19.13
  • Where did you get dlib: pip install dlib
  • Platform: ubuntu16.04 64-bit
  • Compiler: linaro 5.4 gcc
@aneeshp1994
Copy link

The error occurs for python 3.5 as well.

@davisking
Copy link
Owner

That's not what happens when I try it on ubuntu 16.04. What version of cmake do you have installed?

@aneeshp1994
Copy link

I have 3.5.1 on my Jetson TX2

@davisking
Copy link
Owner

Well, I don't know what to tell you. That error seems to indicate that you have a version of cmake with a bug in it, but cmake 3.5.1 is also the version I just tested on ubuntu, and it works fine.

@aneeshp1994
Copy link

I have more than one TX2. The one I am trying to install dlib on is new. Both TX2s have the same cmake version installed on them, and I am following the installation procedure, that I followed on older one, on the newer one.

@davisking
Copy link
Owner

And you are saying it worked on the older one?

Get the latest dlib from github. I just changed it so it will print the cmake version information in the output. Run it and post the output here.

@davisking
Copy link
Owner

davisking commented May 31, 2018

The other thing you should post is the output of this:

cd dlib/cmake_utils/test_for_avx/
mkdir build
cmake ..

Since that's the cmake stuff it's complaining about. Maybe putting "" around ${run_result} on line 17 of the CMakeLists.txt file in that folder will playcate it.

@aneeshp1994
Copy link

Yes, I will post the output. But I would like to mention a few things as well:

  1. I installed dlib on the older one a while ago (more than 2 months ago).
  2. I do not know if cmake was upgraded in the meantime.
    Sorry about that.

@aneeshp1994
Copy link

Command:
sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA

Output:
running install
Checking .pth file support in /usr/local/lib/python3.5/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.5/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing top-level names to dlib.egg-info/top_level.txt
writing dlib.egg-info/PKG-INFO
writing dependency_links to dlib.egg-info/dependency_links.txt
package init file 'dlib/init.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'dlib.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.5.2 (default, Nov 23 2017, 16:37:01)
Invoking CMake setup: 'cmake /home/ubuntu/work/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/work/dlib/build/lib.linux-aarch64-3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DUSE_AVX_INSTRUCTIONS=yes -DDLIB_USE_CUDA=yes -DCMAKE_BUILD_TYPE=Release'
-- pybind11 v2.2.2
-- Using CMake version: 3.5.1
-- Compiling dlib version: 19.13.99
CMake Error at CMakeLists.txt:17 (if):
if given arguments:

"EQUAL" "0" "AND" "compile_result"

Unknown arguments specified

CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/work/dlib/build/temp.linux-aarch64-3.5/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 256, in
'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 67, in run
self.do_egg_install()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
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/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
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/dist-packages/setuptools/command/install_lib.py", line 23, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
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 "setup.py", line 133, in run
self.build_extension(ext)
File "setup.py", line 169, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/ubuntu/work/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/work/dlib/build/lib.linux-aarch64-3.5', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DUSE_AVX_INSTRUCTIONS=yes', '-DDLIB_USE_CUDA=yes', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1

@aneeshp1994
Copy link

Command:
cd /dlib/cmake_utils/test_for_avx/
mkdir build
cmake ..

Output:
CMake Error: The source directory "/home/ubuntu/work/dlib/dlib/cmake_utils" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

@davisking
Copy link
Owner

davisking commented May 31, 2018 via email

@aneeshp1994
Copy link

After including cd build

Output:
-- Using CMake version: 3.5.1
-- Compiling dlib version: 19.13.99
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Found OpenBLAS library
-- Looking for sgetrf_single
-- Looking for sgetrf_single - not found
-- Found LAPACK library
-- Looking for cuDNN install...
-- Found cuDNN: /usr/lib/aarch64-linux-gnu/libcudnn.so
-- Enabling CUDA support for dlib. DLIB WILL USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/work/dlib/dlib/cmake_utils/test_for_avx

@davisking
Copy link
Owner

That doesn't make sense. Try it again with a fresh folder.

cd /dlib/cmake_utils/test_for_avx/
mkdir build
cd build
cmake ..

@aneeshp1994
Copy link

Output:
-- 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
-- run_result =
-- compile_result = FALSE
CMake Error at CMakeLists.txt:17 (if):
if given arguments:

"EQUAL" "0" "AND" "compile_result"

Unknown arguments specified

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/work/dlib/dlib/cmake_utils/test_for_avx/build/CMakeFiles/CMakeOutput.log".

@davisking
Copy link
Owner

davisking commented May 31, 2018 via email

@davisking
Copy link
Owner

davisking commented May 31, 2018 via email

@aneeshp1994
Copy link

Yes it has solved the problem. Thank you!

@davisking
Copy link
Owner

No problem. Thanks for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants