question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error installing from both pip and source

See original GitHub issue

Hi.

I’m getting the same error on both methods of installation. I’m on Ubuntu 18.04, Nvidia driver 440.100 and cuda 10.2.

However, I was able to sucessfully install yolo34py-gpu from pip on my laptop which is also on Ubuntu 18.04, Nvidia driver 440.100 and cuda 10.0.

From pip:

(pm-oulu) gpuserver@gpuserver-SYS-1019GP-TT:~/YOLO3-4-Py$ pip install yolo34py-gpu
Collecting yolo34py-gpu
  Using cached yolo34py-gpu-0.1rc12.tar.gz (66 kB)
Requirement already satisfied: cython>=0.27 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu) (0.29.21)
Requirement already satisfied: requests in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu) (2.24.0)
Requirement already satisfied: numpy in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu) (1.18.5)
Requirement already satisfied: certifi>=2017.4.17 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu) (1.25.9)
Requirement already satisfied: idna<3,>=2.5 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu) (2.10)
Building wheels for collected packages: yolo34py-gpu
  Building wheel for yolo34py-gpu (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1h6lc5a/yolo34py-gpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1h6lc5a/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-8f6fluvq
       cwd: /tmp/pip-install-p1h6lc5a/yolo34py-gpu/
  Complete output (29 lines):
  WARNING:root:GPU environment variable is skipped since DARKNET_HOME is specified
  INFO:root:Compiling wrapper with OpenCV
  INFO:root:DARKNET_HOME is set: /home/gpuserver/darknet
  /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
    warnings.warn(tmpl.format(**locals()))
  running bdist_wheel
  running build
  INFO:root:Copying libdarknet.so from /home/gpuserver/darknet
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/__libdarknet
  copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.7/__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'
  writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  copying __libdarknet/libdarknet.so -> build/lib.linux-x86_64-3.7/__libdarknet
  running build_ext
  skipping 'pydarknet.cpp' Cython extension (up-to-date)
  building 'pydarknet' extension
  creating build/temp.linux-x86_64-3.7
  gcc -pthread -B /home/gpuserver/miniconda3/envs/pm-oulu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CV=1 -I/home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/numpy/core/include -I/home/gpuserver/darknet/include -I/home/gpuserver/darknet/src -I/home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m -c pydarknet.cpp -o build/temp.linux-x86_64-3.7/pydarknet.o  -I/usr/include/opencv
  gcc: error: : No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1h6lc5a/yolo34py-gpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1h6lc5a/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-rs29o4k5/install-record.txt --single-version-externally-managed --compile --install-headers /home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m/yolo34py-gpu
         cwd: /tmp/pip-install-p1h6lc5a/yolo34py-gpu/
    Complete output (32 lines):
    WARNING:root:GPU environment variable is skipped since DARKNET_HOME is specified
    INFO:root:Compiling wrapper with OpenCV
    INFO:root:DARKNET_HOME is set: /home/gpuserver/darknet
    /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '0.1.rc12' to '0.1rc12'
      warnings.warn(tmpl.format(**locals()))
    running install
    running build
    INFO:root:Copying libdarknet.so from /home/gpuserver/darknet
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/__libdarknet
    copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.7/__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 'pydarknet.cpp'
    writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
    copying __libdarknet/libdarknet.so -> build/lib.linux-x86_64-3.7/__libdarknet
    running build_ext
    cythoning pydarknet.pyx to pydarknet.cpp
    /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-p1h6lc5a/yolo34py-gpu/pydarknet.pxd
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'pydarknet' extension
    creating build/temp.linux-x86_64-3.7
    gcc -pthread -B /home/gpuserver/miniconda3/envs/pm-oulu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CV=1 -I/home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/numpy/core/include -I/home/gpuserver/darknet/include -I/home/gpuserver/darknet/src -I/home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m -c pydarknet.cpp -o build/temp.linux-x86_64-3.7/pydarknet.o  -I/usr/include/opencv
    gcc: error: : No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1h6lc5a/yolo34py-gpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1h6lc5a/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-rs29o4k5/install-record.txt --single-version-externally-managed --compile --install-headers /home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m/yolo34py-gpu Check the logs for full command output.

From source:

(pm-oulu) gpuserver@gpuserver-SYS-1019GP-TT:~/YOLO3-4-Py$ pip install .
Processing /home/gpuserver/YOLO3-4-Py
Requirement already satisfied: cython>=0.27 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu==0.1rc13) (0.29.21)
Requirement already satisfied: requests in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu==0.1rc13) (2.24.0)
Requirement already satisfied: numpy in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from yolo34py-gpu==0.1rc13) (1.18.5)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu==0.1rc13) (1.25.9)
Requirement already satisfied: certifi>=2017.4.17 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu==0.1rc13) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu==0.1rc13) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages (from requests->yolo34py-gpu==0.1rc13) (3.0.4)
Building wheels for collected packages: yolo34py-gpu
  Building wheel for yolo34py-gpu (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-10jqgqes/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-10jqgqes/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-kdmowil9
       cwd: /tmp/pip-req-build-10jqgqes/
  Complete output (34 lines):
  WARNING:root:GPU environment variable is skipped since DARKNET_HOME is specified
  INFO:root:Compiling wrapper with OpenCV
  INFO:root:DARKNET_HOME is set: /home/gpuserver/darknet
  /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '0.1.rc13' to '0.1rc13'
    warnings.warn(tmpl.format(**locals()))
  running bdist_wheel
  running build
  INFO:root:Copying libdarknet.so from /home/gpuserver/darknet
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/__libdarknet
  copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.7/__libdarknet
  running egg_info
  creating yolo34py_gpu.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
  writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  reading manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'pydarknet.cpp'
  writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
  copying __libdarknet/libdarknet.so -> build/lib.linux-x86_64-3.7/__libdarknet
  running build_ext
  cythoning pydarknet.pyx to pydarknet.cpp
  /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-req-build-10jqgqes/pydarknet.pxd
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'pydarknet' extension
  creating build/temp.linux-x86_64-3.7
  gcc -pthread -B /home/gpuserver/miniconda3/envs/pm-oulu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_GPU=1 -DUSE_CV=1 -I/home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/numpy/core/include -I/home/gpuserver/darknet/include -I/home/gpuserver/darknet/src -I/usr/local/cuda/include -I/home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m -c pydarknet.cpp -o build/temp.linux-x86_64-3.7/pydarknet.o  -I/usr/include/opencv
  gcc: error: : No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-10jqgqes/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-10jqgqes/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-c67gp4r1/install-record.txt --single-version-externally-managed --compile --install-headers /home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m/yolo34py-gpu
         cwd: /tmp/pip-req-build-10jqgqes/
    Complete output (32 lines):
    WARNING:root:GPU environment variable is skipped since DARKNET_HOME is specified
    INFO:root:Compiling wrapper with OpenCV
    INFO:root:DARKNET_HOME is set: /home/gpuserver/darknet
    /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '0.1.rc13' to '0.1rc13'
      warnings.warn(tmpl.format(**locals()))
    running install
    running build
    INFO:root:Copying libdarknet.so from /home/gpuserver/darknet
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/__libdarknet
    copying __libdarknet/__init__.py -> build/lib.linux-x86_64-3.7/__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 'pydarknet.cpp'
    writing manifest file 'yolo34py_gpu.egg-info/SOURCES.txt'
    copying __libdarknet/libdarknet.so -> build/lib.linux-x86_64-3.7/__libdarknet
    running build_ext
    cythoning pydarknet.pyx to pydarknet.cpp
    /home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-req-build-10jqgqes/pydarknet.pxd
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'pydarknet' extension
    creating build/temp.linux-x86_64-3.7
    gcc -pthread -B /home/gpuserver/miniconda3/envs/pm-oulu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_GPU=1 -DUSE_CV=1 -I/home/gpuserver/miniconda3/envs/pm-oulu/lib/python3.7/site-packages/numpy/core/include -I/home/gpuserver/darknet/include -I/home/gpuserver/darknet/src -I/usr/local/cuda/include -I/home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m -c pydarknet.cpp -o build/temp.linux-x86_64-3.7/pydarknet.o  -I/usr/include/opencv
    gcc: error: : No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/gpuserver/miniconda3/envs/pm-oulu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-10jqgqes/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-10jqgqes/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-c67gp4r1/install-record.txt --single-version-externally-managed --compile --install-headers /home/gpuserver/miniconda3/envs/pm-oulu/include/python3.7m/yolo34py-gpu Check the logs for full command output.

Please help me look into it and thanks a lot in advance.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anhminh3105commented, Jul 13, 2020

Thanks for your immediate support, very appreciated.

There is currently a booting problem with the machine I’m working with, I will let you know how it does after trying that out once the machine is fixed.

Best regards.

0reactions
anhminh3105commented, Aug 12, 2020

After trying out different commands lying around the internet, I managed to solve the problems somehow and the only one command that affected my machine at all was this sudo apt-get install libffi-dev and reinstall python3-dev.

Thanks anyway for your support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix "pip"? - Stack Overflow
First check whether pip installed or not , in command prompt try pip --version , you should get something like this - pip...
Read more >
Problem with "pip install" - Python Help
If you get an error with the pip install, first confirm pip is actually using the pip in your Anaconda env; pip --version...
Read more >
error during install of dependencies via pip; Python 3.8; gcc ...
Hello, I have a problem during the installation of emukit via pip. I am using Python 3.8.3. I try to install the current...
Read more >
How to Install Pip on Windows - ActiveState
Adding PIP to Windows Environment Variables ... One of the most common problems with running Python tools like pip is the “not on...
Read more >
Dependency Resolution - pip documentation v22.3.1
This section provides practical suggestions to pip users who encounter a ResolutionImpossible error, where pip cannot install their specified packages due to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found