Skip to content

package install error #11

Open
Open

Description

@goodsollee

Hi, I'm currently trying to install pynvjpeg on ubuntu 16.04 with pip install pynvjpeg.

However, I face the awkward errors,

the error logs are as follows:

Building wheel for pynvjpeg (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/setup.py'"'"'; file='"'"'/tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-90zcxktg
cwd: /tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/
Complete output (56 lines):
running bdist_wheel
running build
running build_ext
building 'nvjpeg' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
creating build/temp.linux-x86_64-3.8/src/x86
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DJPEGCODER_ARCH=x86 -Iinclude -I/home/sonic/.local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/cuda/include -I/usr/include/python3.8 -c nvjpeg-python.cpp -o build/temp.linux-x86_64-3.8/nvjpeg-python.o
In file included from nvjpeg-python.cpp:11:0:
include/JpegCoder.hpp:72:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
if(this->data!=nullptr){
^
include/JpegCoder.hpp: In destructor ‘JpegCoderBytes::~JpegCoderBytes()’:
include/JpegCoder.hpp:72:24: error: ‘nullptr’ was not declared in this scope
if(this->data!=nullptr){
^
nvjpeg-python.cpp: In function ‘PyObject* NvJpeg_encode(NvJpeg*, PyObject*)’:
nvjpeg-python.cpp:114:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto img = new JpegCoderImage(PyArray_DIM(vecin, 1), PyArray_DIM(vecin, 0), 3, JPEGCODER_CSS_444);
^
nvjpeg-python.cpp:114:10: error: ‘img’ does not name a type
auto img = new JpegCoderImage(PyArray_DIM(vecin, 1), PyArray_DIM(vecin, 0), 3, JPEGCODER_CSS_444);
^
nvjpeg-python.cpp:115:5: error: ‘img’ was not declared in this scope
img->fill(buffer);
^
nvjpeg-python.cpp:120:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto data = m_handle->encode(img, quality);
^
nvjpeg-python.cpp:120:10: error: ‘data’ does not name a type
auto data = m_handle->encode(img, quality);
^
nvjpeg-python.cpp:122:60: error: ‘data’ was not declared in this scope
PyObject* rtn = PyBytes_FromStringAndSize((const char*)data->data, data->size);
^
nvjpeg-python.cpp:124:16: error: type ‘’ argument given to ‘delete’, expected pointer
delete(data);
^
nvjpeg-python.cpp:125:15: error: type ‘’ argument given to ‘delete’, expected pointer
delete(img);
^
nvjpeg-python.cpp: In function ‘PyObject* NvJpeg_read(NvJpeg*, PyObject*)’:
nvjpeg-python.cpp:170:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto img = m_handle->decode((const unsigned char*)jpegData, dataLength);
^
nvjpeg-python.cpp:170:10: error: ‘img’ does not name a type
auto img = m_handle->decode((const unsigned char*)jpegData, dataLength);
^
nvjpeg-python.cpp:174:27: error: ‘img’ was not declared in this scope
unsigned char* data = img->buffer();
^
nvjpeg-python.cpp:180:15: error: type ‘’ argument given to ‘delete’, expected pointer
delete(img);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for pynvjpeg
Running setup.py clean for pynvjpeg
Failed to build pynvjpeg
Installing collected packages: pynvjpeg
Running setup.py install for pynvjpeg ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/setup.py'"'"'; file='"'"'/tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-dwlqk24l/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/sonic/.local/include/python3.8/pynvjpeg
cwd: /tmp/pip-install-3fkss5ir/pynvjpeg_71d9313121464860a63e23c5c725fe41/
Complete output (56 lines):
running install
running build
running build_ext
building 'nvjpeg' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
creating build/temp.linux-x86_64-3.8/src/x86
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DJPEGCODER_ARCH=x86 -Iinclude -I/home/sonic/.local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/cuda/include -I/usr/include/python3.8 -c nvjpeg-python.cpp -o build/temp.linux-x86_64-3.8/nvjpeg-python.o
In file included from nvjpeg-python.cpp:11:0:
include/JpegCoder.hpp:72:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
if(this->data!=nullptr){
^
include/JpegCoder.hpp: In destructor ‘JpegCoderBytes::~JpegCoderBytes()’:
include/JpegCoder.hpp:72:24: error: ‘nullptr’ was not declared in this scope
if(this->data!=nullptr){
^
nvjpeg-python.cpp: In function ‘PyObject* NvJpeg_encode(NvJpeg*, PyObject*)’:
nvjpeg-python.cpp:114:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto img = new JpegCoderImage(PyArray_DIM(vecin, 1), PyArray_DIM(vecin, 0), 3, JPEGCODER_CSS_444);
^
nvjpeg-python.cpp:114:10: error: ‘img’ does not name a type
auto img = new JpegCoderImage(PyArray_DIM(vecin, 1), PyArray_DIM(vecin, 0), 3, JPEGCODER_CSS_444);
^
nvjpeg-python.cpp:115:5: error: ‘img’ was not declared in this scope
img->fill(buffer);
^
nvjpeg-python.cpp:120:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto data = m_handle->encode(img, quality);
^
nvjpeg-python.cpp:120:10: error: ‘data’ does not name a type
auto data = m_handle->encode(img, quality);
^
nvjpeg-python.cpp:122:60: error: ‘data’ was not declared in this scope
PyObject* rtn = PyBytes_FromStringAndSize((const char*)data->data, data->size);
^
nvjpeg-python.cpp:124:16: error: type ‘’ argument given to ‘delete’, expected pointer
delete(data);
^
nvjpeg-python.cpp:125:15: error: type ‘’ argument given to ‘delete’, expected pointer
delete(img);
^
nvjpeg-python.cpp: In function ‘PyObject* NvJpeg_read(NvJpeg*, PyObject*)’:
nvjpeg-python.cpp:170:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto img = m_handle->decode((const unsigned char*)jpegData, dataLength);
^
nvjpeg-python.cpp:170:10: error: ‘img’ does not name a type
auto img = m_handle->decode((const unsigned char*)jpegData, dataLength);
^
nvjpeg-python.cpp:174:27: error: ‘img’ was not declared in this scope
unsigned char* data = img->buffer();
^
nvjpeg-python.cpp:180:15: error: type ‘’ argument given to ‘delete’, expected pointer
delete(img);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Is there any solution to solve these problems?

Activity

  1. kosuke-zhang commented on Mar 21, 2023

    @kosuke-zhang

    +10086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions