Closed quqixun closed 1 year ago
The wiki is outdated. When doing the update to the pip installation I tried to find the old wiki to update it but I didn't find it.
For the new installation process it shouldn't be necessary to manipulate to manipulate LD_LIBRARY_PATH path except your ffmpeg libraries are outside LD_LIBRARY_PATH/LD_LOAD_PATH. The pip installation should handle everything for you.
To use PyNvCodec.cpython-39-x86_64-linux.so from python it's directory needs to be in your PYTHON_PATH environment variable or sys.path
python list. . You can also just change the working directory to the extension. Pip installation will handle this automatically for you.
You can then import it via import PyNvCodec
. When your python extension starts with an underscore, you also need to use import _PyNVCodec
I've updated the wiki. Please feel free to reopen, if the problem still exists
Describe the problem I compiled VPF as the description in wiki, using code at commit ec8caf75c341b9f4a125db59676c6742c8b666fd .
Then, I got a library as shown below:
I tried to add
PyNvCodec
dir toLD_LIBRARY_PATH
, or copy_PyNvCodec.cpython-39-x86_64-linux-gnu.so
to python lib, thenimport PyNvCodec
, but I always get errorModuleNotFoundError: No module named 'PyNvCodec'
.How to use
_PyNvCodec.cpython-39-x86_64-linux-gnu.so
as a python library?New compiled outputs are different with previous at 873a17b829f1bb2181b9e5a7bd24960dcf17d94a as shown below:
I added this
bin
dir toLD_LIBRARY_PATH
, then sample code worked fine.Could you please change the wiki to make it work with newest code.
Desktop (please complete the following information):