jamesbowman / openexrpython

OpenEXR bindings for Python
Other
94 stars 35 forks source link

Unable to install the PyPi package for Python 3.6 #19

Closed Amir-Arsalan closed 5 years ago

Amir-Arsalan commented 5 years ago

Hi James,

I'm trying to install the PyPi package for Python 3.6 but I get the following errors:

 Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5ll4ucfs/openexr/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-iayprhtr-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying Imath.py -> build/lib.linux-x86_64-3.6
    running build_ext
    building 'OpenEXR' extension
    creating build/temp.linux-x86_64-3.6
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/usr/include/python3.6m -c OpenEXR.cpp -o build/temp.linux-x86_64-3.6/OpenEXR.o -g -DVERSION="1.3.2"
    OpenEXR.cpp:1:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5ll4ucfs/openexr/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-iayprhtr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-5ll4ucfs/openexr/

Does the PyPi package support Python 3.6?

tiagoshibata commented 5 years ago

You should install the Python development package for your distribution (which includes the Python headers). For most distros it's got a -dev suffix.

Amir-Arsalan commented 5 years ago

@tiagoshibata I'm following these instructions to install Python 3.6. It looks like I cannot do sudo apt-get install python3.6-dev using this ... . What's the solution then?

Amir-Arsalan commented 5 years ago

Actually sudo apt-get install python3.6-dev did the job.