jamesbowman / openexrpython

OpenEXR bindings for Python
Other
95 stars 35 forks source link

installation fails with Python 3.5.3 in Ubuntu 22.04 #50

Closed monajalal closed 11 months ago

monajalal commented 11 months ago
(pvrendering) (base) mona@mona-ThinkStation-P7:~$ pip install git+https://github.com/jamesbowman/openexrpython.git
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting git+https://github.com/jamesbowman/openexrpython.git
  Cloning https://github.com/jamesbowman/openexrpython.git to /tmp/pip-req-build-rkytdgme
  Running command git clone -q https://github.com/jamesbowman/openexrpython.git /tmp/pip-req-build-rkytdgme
Using legacy 'setup.py install' for OpenEXR, since package 'wheel' is not installed.
Installing collected packages: OpenEXR
    Running setup.py install for OpenEXR ... error
    ERROR: Command errored out with exit status 1:
     command: /home/mona/pvnet-rendering/pvrendering/bin/python3.5m -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rkytdgme/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-rkytdgme/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-tct_rk3d/install-record.txt --single-version-externally-managed --compile --install-headers /home/mona/pvnet-rendering/pvrendering/include/site/python3.5/OpenEXR
         cwd: /tmp/pip-req-build-rkytdgme/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying Imath.py -> build/lib.linux-x86_64-3.5
    running build_ext
    building 'OpenEXR' extension
    creating build/temp.linux-x86_64-3.5
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/home/mona/pvnet-rendering/pvrendering/include -I/home/mona/Downloads/blender-2.79a-linux-glibc219-x86_64/2.79/python/include/python3.5m -c OpenEXR.cpp -o build/temp.linux-x86_64-3.5/OpenEXR.o -g -DVERSION="1.3.2"
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    OpenEXR.cpp:1:10: fatal error: Python.h: No such file or directory
        1 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/mona/pvnet-rendering/pvrendering/bin/python3.5m -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rkytdgme/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-rkytdgme/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-tct_rk3d/install-record.txt --single-version-externally-managed --compile --install-headers /home/mona/pvnet-rendering/pvrendering/include/site/python3.5/OpenEXR Check the logs for full command output.

and also:

(pvrendering) (base) mona@mona-ThinkStation-P7:~$ export CFLAGS="-I/home/mona/Python-3.5.3/Include"
(pvrendering) (base) mona@mona-ThinkStation-P7:~$ pip install git+https://github.com/jamesbowman/openexrpython.git
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting git+https://github.com/jamesbowman/openexrpython.git
  Cloning https://github.com/jamesbowman/openexrpython.git to /tmp/pip-req-build-1qv97v13
  Running command git clone -q https://github.com/jamesbowman/openexrpython.git /tmp/pip-req-build-1qv97v13
Using legacy 'setup.py install' for OpenEXR, since package 'wheel' is not installed.
Installing collected packages: OpenEXR
    Running setup.py install for OpenEXR ... error
    ERROR: Command errored out with exit status 1:
     command: /home/mona/pvnet-rendering/pvrendering/bin/python3.5m -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1qv97v13/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-1qv97v13/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-79ik96fg/install-record.txt --single-version-externally-managed --compile --install-headers /home/mona/pvnet-rendering/pvrendering/include/site/python3.5/OpenEXR
         cwd: /tmp/pip-req-build-1qv97v13/
    Complete output (18 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying Imath.py -> build/lib.linux-x86_64-3.5
    running build_ext
    building 'OpenEXR' extension
    creating build/temp.linux-x86_64-3.5
    gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/mona/Python-3.5.3/Include -fPIC -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/home/mona/pvnet-rendering/pvrendering/include -I/home/mona/Downloads/blender-2.79a-linux-glibc219-x86_64/2.79/python/include/python3.5m -c OpenEXR.cpp -o build/temp.linux-x86_64-3.5/OpenEXR.o -g -DVERSION="1.3.2"
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    OpenEXR.cpp:1817:18: warning: ‘PyObject* inchannels_multipart(PyObject*, PyObject*, PyObject*)’ defined but not used [-Wunused-function]
     1817 | static PyObject *inchannels_multipart(PyObject *self, PyObject *args, PyObject *kw)
          |                  ^~~~~~~~~~~~~~~~~~~~
    g++ -pthread -shared -L/opt/lib/bz2/lib -L/opt/lib/lzma/lib -L/opt/lib/ssl/lib -L/opt/lib/zlib/lib -L/opt/lib/libc6/lib -L/opt/lib/ncurses/lib -L/opt/lib/gpm/lib -L/opt/lib/sqlite/lib -L/opt/lib/readline/lib -Wl,--version-script=python.map -I/home/mona/Python-3.5.3/Include build/temp.linux-x86_64-3.5/OpenEXR.o -L/usr/local/lib -L/opt/local/lib -lIex -lHalf -lImath -lIlmImf -lz -o build/lib.linux-x86_64-3.5/OpenEXR.cpython-35m-x86_64-linux-gnu.so
    /usr/bin/ld: cannot open linker script file python.map: No such file or directory
    collect2: error: ld returned 1 exit status
    error: command 'g++' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/mona/pvnet-rendering/pvrendering/bin/python3.5m -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1qv97v13/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-1qv97v13/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-79ik96fg/install-record.txt --single-version-externally-managed --compile --install-headers /home/mona/pvnet-rendering/pvrendering/include/site/python3.5/OpenEXR Check the logs for full command output.

I get a similar error as in https://github.com/jamesbowman/openexrpython/issues/48

jamesbowman commented 11 months ago

This code is no longer maintained -- see https://github.com/sanguinariojoe/pip-openexr