Infiziert90/getnative

Can't install getnative through Pip

Closed this issue · 7 comments

I've tried installing getnative using pip install getnative, but I keep getting this;

Defaulting to user installation because normal site-packages is not writeable
Collecting getnative
  Using cached getnative-3.2.0-py3-none-any.whl (12 kB)
Collecting VapourSynth>=55
  Using cached VapourSynth-59.zip (561 kB)
  Preparing metadata (setup.py) ... done
Collecting matplotlib>=2.0.0
  Using cached matplotlib-3.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB)
Requirement already satisfied: python-dateutil>=2.7 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (2.8.1)
Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (2.4.7)
Requirement already satisfied: fonttools>=4.22.0 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (4.34.4)
Requirement already satisfied: numpy>=1.17 in /usr/lib64/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (1.22.0)
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (1.4.4)
Requirement already satisfied: packaging>=20.0 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (21.3)
Requirement already satisfied: pillow>=6.2.0 in /usr/lib64/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (9.1.0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->getnative) (1.16.0)
Building wheels for collected packages: VapourSynth
  Building wheel for VapourSynth (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      /home/username/.local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_ext
      skipping 'src/cython/vapoursynth.c' Cython extension (up-to-date)
      building 'vapoursynth' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/src
      creating build/temp.linux-x86_64-cpython-310/src/cython
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DVS_GRAPH_API -I. -Isrc/cython -Isrc/vsscript -I/usr/include/python3.10 -c src/cython/vapoursynth.c -o build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o
      src/cython/vapoursynth.c:6:10: fatal error: Python.h: No such file or directory
          6 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/lib64/ccache/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for VapourSynth
  Running setup.py clean for VapourSynth
Failed to build VapourSynth
Installing collected packages: VapourSynth, matplotlib, getnative
  Running setup.py install for VapourSynth ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for VapourSynth did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      /home/username/.local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /home/username/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      skipping 'src/cython/vapoursynth.c' Cython extension (up-to-date)
      building 'vapoursynth' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/src
      creating build/temp.linux-x86_64-cpython-310/src/cython
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DVS_GRAPH_API -I. -Isrc/cython -Isrc/vsscript -I/usr/include/python3.10 -c src/cython/vapoursynth.c -o build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o
      src/cython/vapoursynth.c:6:10: fatal error: Python.h: No such file or directory
          6 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/lib64/ccache/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> VapourSynth

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

What should I do?

sudo apt install python3-dev or the equivalent for your distro

Some distros use -devel instead of -dev

Thanks for the quick response, but this is giving the same error. It did take a while longer, though (while building wheels for VapourSynth).

Please post the new error message.

Defaulting to user installation because normal site-packages is not writeable
Collecting getnative
  Using cached getnative-3.2.0-py3-none-any.whl (12 kB)
Collecting matplotlib>=2.0.0
  Using cached matplotlib-3.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB)
Collecting VapourSynth>=55
  Using cached VapourSynth-59.zip (561 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (1.4.4)
Requirement already satisfied: fonttools>=4.22.0 in ./.local/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (4.34.4)
Requirement already satisfied: packaging>=20.0 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (21.3)
Requirement already satisfied: python-dateutil>=2.7 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (2.8.1)
Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (2.4.7)
Requirement already satisfied: numpy>=1.17 in /usr/lib64/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (1.22.0)
Requirement already satisfied: pillow>=6.2.0 in /usr/lib64/python3.10/site-packages (from matplotlib>=2.0.0->getnative) (9.1.0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->getnative) (1.16.0)
Building wheels for collected packages: VapourSynth
  Building wheel for VapourSynth (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      /home/username/.local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_ext
      skipping 'src/cython/vapoursynth.c' Cython extension (up-to-date)
      building 'vapoursynth' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/src
      creating build/temp.linux-x86_64-cpython-310/src/cython
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DVS_GRAPH_API -I. -Isrc/cython -Isrc/vsscript -I/usr/include/python3.10 -c src/cython/vapoursynth.c -o build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o
      src/cython/vapoursynth.c:61602:18: warning: ‘__pyx_f_11vapoursynth__vsscript_use_or_create_environment’ defined but not used [-Wunused-function]
      61602 | static PyObject *__pyx_f_11vapoursynth__vsscript_use_or_create_environment(int __pyx_v_id) {
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      creating build/lib.linux-x86_64-cpython-310
      gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,--build-id=sha1 -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,--build-id=sha1 -g build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o -L. -Lbuild -L/usr/lib64 -lvapoursynth -o build/lib.linux-x86_64-cpython-310/vapoursynth.cpython-310-x86_64-linux-gnu.so
      /usr/bin/ld: cannot find -lvapoursynth
      collect2: error: ld returned 1 exit status
      error: command '/usr/lib64/ccache/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for VapourSynth
  Running setup.py clean for VapourSynth
Failed to build VapourSynth
Installing collected packages: VapourSynth, matplotlib, getnative
  Running setup.py install for VapourSynth ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for VapourSynth did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      /home/username/.local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /home/username/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      skipping 'src/cython/vapoursynth.c' Cython extension (up-to-date)
      building 'vapoursynth' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/src
      creating build/temp.linux-x86_64-cpython-310/src/cython
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DVS_GRAPH_API -I. -Isrc/cython -Isrc/vsscript -I/usr/include/python3.10 -c src/cython/vapoursynth.c -o build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o
      src/cython/vapoursynth.c:61602:18: warning: ‘__pyx_f_11vapoursynth__vsscript_use_or_create_environment’ defined but not used [-Wunused-function]
      61602 | static PyObject *__pyx_f_11vapoursynth__vsscript_use_or_create_environment(int __pyx_v_id) {
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      creating build/lib.linux-x86_64-cpython-310
      gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,--build-id=sha1 -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,--build-id=sha1 -g build/temp.linux-x86_64-cpython-310/src/cython/vapoursynth.o -L. -Lbuild -L/usr/lib64 -lvapoursynth -o build/lib.linux-x86_64-cpython-310/vapoursynth.cpython-310-x86_64-linux-gnu.so
      /usr/bin/ld: cannot find -lvapoursynth
      collect2: error: ld returned 1 exit status
      error: command '/usr/lib64/ccache/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> VapourSynth

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

You need vapoursynth installed beforehand. pip only installs the Python bindings to VapourSynth (the module).

Okay, I'll try that, then. Thanks again!