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

Installing Darknet fails due to SSL Error #62

Closed
Paydayzcool opened this issue Feb 13, 2019 · 3 comments
Closed

Installing Darknet fails due to SSL Error #62

Paydayzcool opened this issue Feb 13, 2019 · 3 comments

Comments

@Paydayzcool
Copy link

Paydayzcool commented Feb 13, 2019

Hi,

I am on Ubuntu 18.04 and I am trying to install this package. However the build wheel fails due to an SSL error when installing Darknet.

python3 -m pip install yolo34py-gpu

Collecting yolo34py-gpu
  Using cached https://files.pythonhosted.org/packages/dc/a3/12c668e54109c5469a8312d757b357dda0b2efc2150043b76b58f6ba75c3/yolo34py-gpu-0.1rc12.tar.gz
Requirement already satisfied: cython>=0.27 in ./.local/lib/python3.6/site-packages (from yolo34py-gpu) (0.29.5)
Requirement already satisfied: numpy in ./.local/lib/python3.6/site-packages (from yolo34py-gpu) (1.16.1)
Requirement already satisfied: requests in ./.local/lib/python3.6/site-packages (from yolo34py-gpu) (2.21.0)
Requirement already satisfied: idna<2.9,>=2.5 in ./.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (1.24.1)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (2018.11.29)
Building wheels for collected packages: yolo34py-gpu
  Building wheel for yolo34py-gpu (setup.py) ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xsvnxj4y/yolo34py-gpu/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-uqi0hqqx --python-tag cp36:
  INFO:root:Selected Darknet Branch: yolo34py-intergration-nocv from Darknet Fork 'https://github.com/madhawav/darknet/'
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  /usr/lib/python3/dist-packages/setuptools/dist.py:397: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
    normalized_version,
  running bdist_wheel
  running build
  INFO:root:Temp Path: /tmp/darknet
  INFO:root:Downloading darknet
  error: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /madhawav/darknet/archive/yolo34py-intergration-nocv.zip (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

  ----------------------------------------
  Failed building wheel for yolo34py-gpu
  Running setup.py clean for yolo34py-gpu
Failed to build yolo34py-gpu
Installing collected packages: yolo34py-gpu
  Running setup.py install for yolo34py-gpu ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xsvnxj4y/yolo34py-gpu/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-wcccw2jp/install-record.txt --single-version-externally-managed --compile:
    INFO:root:Selected Darknet Branch: yolo34py-intergration-nocv from Darknet Fork 'https://github.com/madhawav/darknet/'
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    /usr/lib/python3/dist-packages/setuptools/dist.py:397: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
      normalized_version,
    running install
    running build
    INFO:root:Temp Path: /tmp/darknet
    INFO:root:Downloading darknet
    error: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /madhawav/darknet/archive/yolo34py-intergration-nocv.zip (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xsvnxj4y/yolo34py-gpu/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-wcccw2jp/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-xsvnxj4y/yolo34py-gpu/

I suspect that this build wheel failure results in the entire installation failing.

Does anyone know a solution for this?

@madhawav
Copy link
Owner

This is actually a strange bug. Your system does not seem to trust GitHub.com.

  1. Can you verify that your system time and the region is correct?
  2. Can you try with a different internet connection?

@Paydayzcool
Copy link
Author

Paydayzcool commented Feb 25, 2019

Hi again, sorry for the late reply,

I also forgot to tell you that ubuntu is acting as a subsystem on a windows OS.

I am sure that my time and region is correct. I have also tried with a different internet connection and the build wheel still failed. However, the output seems to be slightly different:


Collecting yolo34py-gpu
  Using cached https://files.pythonhosted.org/packages/dc/a3/12c668e54109c5469a8312d757b357dda0b2efc2150043b76b58f6ba75c3/yolo34py-gpu-0.1rc12.tar.gz
Requirement already satisfied: cython>=0.27 in /home/kookie/.local/lib/python3.6/site-packages (from yolo34py-gpu) (0.29.5)
Requirement already satisfied: numpy in /home/kookie/.local/lib/python3.6/site-packages (from yolo34py-gpu) (1.16.1)
Requirement already satisfied: requests in /home/kookie/.local/lib/python3.6/site-packages (from yolo34py-gpu) (2.21.0)
Requirement already satisfied: certifi>=2017.4.17 in /home/kookie/.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (2018.11.29)
Requirement already satisfied: idna<2.9,>=2.5 in /home/kookie/.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/kookie/.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /home/kookie/.local/lib/python3.6/site-packages (from requests->yolo34py-gpu) (1.24.1)
Building wheels for collected packages: yolo34py-gpu
  Building wheel for yolo34py-gpu (setup.py) ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1nx4sjd1/yolo34py-gpu/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-q_dv1nhu --python-tag cp36:
  INFO:root:Selected Darknet Branch: yolo34py-intergration-nocv from Darknet Fork 'https://github.com/madhawav/darknet/'
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  /usr/lib/python3/dist-packages/setuptools/dist.py:397: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
    normalized_version,
  running bdist_wheel
  running build
  INFO:root:Temp Path: /tmp/darknet
  INFO:root:Downloading darknet
  INFO:root:Extracting darknet
  INFO:root:Building darknet
  In file included from ./src/utils.h:5:0,
                   from ./src/gemm.c:2:
  include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory
       #include "cuda_runtime.h"
                ^~~~~~~~~~~~~~~~
  compilation terminated.
  make: *** [obj/gemm.o] Error 1
  running build_py
  INFO:root:Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
  INFO:root:Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/__libdarknet
  copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.6/__libdarknet
  running egg_info
  writing yolo34py_gpu.egg-info/PKG-INFO
  writing dependency_links to yolo34py_gpu.egg-info/dependency_links.txt
  writing requirements to yolo34py_gpu.egg-info/requires.txt
  writing top-level names to yolo34py_gpu.egg-info/top_level.txt
  reading manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '__libdarknet/libdarknet.so'
  writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  running build_ext
  skipping 'pydarknet.cpp' Cython extension (up-to-date)
  building 'pydarknet' extension
  creating build/temp.linux-x86_64-3.6
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_CV=0 -I/home/kookie/.local/lib/python3.6/site-packages/numpy/core/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/src -I/usr/include/python3.6m -c pydarknet.cpp -o build/temp.linux-x86_64-3.6/pydarknet.o -I/usr/include/python3.6m -I/usr/include/x86_64-linux-gnu/python3.6m
  In file included from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                   from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from pydarknet.cpp:580:
  /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_CV=0 -I/home/kookie/.local/lib/python3.6/site-packages/numpy/core/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/src -I/usr/include/python3.6m -c bridge.cpp -o build/temp.linux-x86_64-3.6/bridge.o -I/usr/include/python3.6m -I/usr/include/x86_64-linux-gnu/python3.6m
  x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/pydarknet.o build/temp.linux-x86_64-3.6/bridge.o -L. -L./__libdarknet -ldarknet -lm -lpthread -o build/lib.linux-x86_64-3.6/pydarknet.cpython-36m-x86_64-linux-gnu.so -lpython3.6m -Wl,-rpath,/home/kookie/.local/lib/python3.6/site-packages/__libdarknet -Wl,-rpath,/usr/local/lib/python3.6/dist-packages/__libdarknet -Wl,-rpath,/usr/lib/python3/dist-packages/__libdarknet
  /usr/bin/ld: cannot find -ldarknet
  collect2: error: ld returned 1 exit status
  error: command 'x86_64-linux-gnu-g++' failed with exit status 1

  ----------------------------------------
  Failed building wheel for yolo34py-gpu
  Running setup.py clean for yolo34py-gpu
Failed to build yolo34py-gpu
Installing collected packages: yolo34py-gpu
  Running setup.py install for yolo34py-gpu ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1nx4sjd1/yolo34py-gpu/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-lipta9_d/install-record.txt --single-version-externally-managed --compile:
    INFO:root:Selected Darknet Branch: yolo34py-intergration-nocv from Darknet Fork 'https://github.com/madhawav/darknet/'
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    /usr/lib/python3/dist-packages/setuptools/dist.py:397: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
      normalized_version,
    running install
    running build
    INFO:root:Temp Path: /tmp/darknet
    INFO:root:Downloading darknet
    INFO:root:Extracting darknet
    INFO:root:Building darknet
    In file included from ./src/utils.h:5:0,
                     from ./src/gemm.c:2:
    include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory
         #include "cuda_runtime.h"
                  ^~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [obj/gemm.o] Error 1
    running build_py
    INFO:root:Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
    INFO:root:Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/__libdarknet
    copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.6/__libdarknet
    running egg_info
    writing yolo34py_gpu.egg-info/PKG-INFO
    writing dependency_links to yolo34py_gpu.egg-info/dependency_links.txt
    writing requirements to yolo34py_gpu.egg-info/requires.txt
    writing top-level names to yolo34py_gpu.egg-info/top_level.txt
    reading manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '__libdarknet/libdarknet.so'
    warning: no files found matching 'pydarknet.cpp'
    writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
    running build_ext
    cythoning pydarknet.pyx to pydarknet.cpp
    /home/kookie/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-1nx4sjd1/yolo34py-gpu/pydarknet.pxd
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'pydarknet' extension
    creating build/temp.linux-x86_64-3.6
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_CV=0 -I/home/kookie/.local/lib/python3.6/site-packages/numpy/core/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/src -I/usr/include/python3.6m -c pydarknet.cpp -o build/temp.linux-x86_64-3.6/pydarknet.o -I/usr/include/python3.6m -I/usr/include/x86_64-linux-gnu/python3.6m
    In file included from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                     from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pydarknet.cpp:607:
    /home/kookie/.local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_CV=0 -I/home/kookie/.local/lib/python3.6/site-packages/numpy/core/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/include -I/tmp/darknet/darknet-yolo34py-intergration-nocv/src -I/usr/include/python3.6m -c bridge.cpp -o build/temp.linux-x86_64-3.6/bridge.o -I/usr/include/python3.6m -I/usr/include/x86_64-linux-gnu/python3.6m
    x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/pydarknet.o build/temp.linux-x86_64-3.6/bridge.o -L. -L./__libdarknet -ldarknet -lm -lpthread -o build/lib.linux-x86_64-3.6/pydarknet.cpython-36m-x86_64-linux-gnu.so -lpython3.6m -Wl,-rpath,/home/kookie/.local/lib/python3.6/site-packages/__libdarknet -Wl,-rpath,/usr/local/lib/python3.6/dist-packages/__libdarknet -Wl,-rpath,/usr/lib/python3/dist-packages/__libdarknet
    /usr/bin/ld: cannot find -ldarknet
    collect2: error: ld returned 1 exit status
    error: command 'x86_64-linux-gnu-g++' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1nx4sjd1/yolo34py-gpu/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-lipta9_d/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-1nx4sjd1/yolo34py-gpu/```

@madhawav
Copy link
Owner

Hi,
In this case the GPU version will not work.
As far as I know, Windows does not support sharing of CUDA to a subsystem running inside it.

Reference: NVIDIA/nvidia-docker#665 (comment)

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

2 participants