anibali / pywebp

Python bindings for WebP
MIT License
74 stars 24 forks source link

No matching distribution found for webp #24

Closed implementosk closed 3 years ago

implementosk commented 3 years ago

Hi,

I have tried to install webp: pip3 install webp

Unfortunately i receive error: ERROR: Could not find a version that satisfies the requirement webp (from versions: 0.1.0a4, 0.1.0a5, 0.1.0a6, 0.1.0a7, 0.1.0a9, 0.1.0a10, 0.1.0a11, 0.1.0a12, 0.1.0a13, 0.1.0a14, 0.1.0a15, 0.1.0a16, 0.1.0, 0.1.1) ERROR: No matching distribution found for webp

Full output: ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2h0kdpgl/webp_982bcc469215407a9724d41dcda8a63b/setup.py'"'"'; file='"'"'/tmp/pip-install-2h0kdpgl/webp_982bcc469215407a9724d41dcda8a63b/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-icxt3c46 cwd: /tmp/pip-install-2h0kdpgl/webp_982bcc469215407a9724d41dcda8a63b/ Complete output (68 lines): Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.version=8.3 os=Linux os_build=Linux [options] [build_requires] [env]

conanfile.txt: Installing package Requirements libwebp/1.0.3@bincrafters/stable from 'conan-center' - Cache Packages libwebp/1.0.3@bincrafters/stable:4f7fdaf7ecd182f1bc32b35513734e57dafe119a - Missing

Installing (downloading, building) binaries...

ERROR: Missing binary: libwebp/1.0.3@bincrafters/stable:4f7fdaf7ecd182f1bc32b35513734e57dafe119a libwebp/1.0.3@bincrafters/stable: WARN: Can't find a 'libwebp/1.0.3@bincrafters/stable' package for the specified settings, options and dependencies:

WARNING: Discarding https://files.pythonhosted.org/packages/62/df/1efb36189ee596f6d3773c8c1b051ada90d244a601b0e4de00181e8fa6f9/webp-0.1.0.tar.gz#sha256=9f15bf22999789b05f12dd02e0970d44adf506e086ea9558e6c5abc4c5585126 (from https://pypi.org/simple/webp/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement webp (from versions: 0.1.0a4, 0.1.0a5, 0.1.0a6, 0.1.0a7, 0.1.0a9, 0.1.0a10, 0.1.0a11, 0.1.0a12, 0.1.0a13, 0.1.0a14, 0.1.0a15, 0.1.0a16, 0.1.0, 0.1.1) ERROR: No matching distribution found for webp

Thanks.

anibali commented 3 years ago

It looks like you somehow have your compiler version stored with a minor version number included, which is apparently not Conan-friendly.

Try running the following command before installing webp:

conan profile update "settings.compiler.version=8" default
implementosk commented 3 years ago

It looks like you somehow have your compiler version stored with a minor version number included, which is apparently not Conan-friendly.

Try running the following command before installing webp:

conan profile update "settings.compiler.version=8" default

Thanks for your answer.

After running your command, another error: build/temp.linux-x86_64-3.7/_webp.c:50:14: fatal error: pyconfig.h: No such file or directory

include

              ^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Full output:

Collecting webp Using cached webp-0.1.1.tar.gz (10 kB) Requirement already satisfied: Pillow>=4.0.0 in /usr/local/lib/python3.7/dist-packages (from webp) (8.2.0) Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from webp) (1.14.5) Requirement already satisfied: numpy>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from webp) (1.20.2) Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.0.0->webp) (2.20) Building wheels for collected packages: webp Building wheel for webp (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/setup.py'"'"'; file='"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/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-l1wpx2sd cwd: /tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/ Complete output (49 lines): Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.version=8 os=Linux os_build=Linux [options] [build_requires] [env]

conanfile.txt: Installing package Requirements libwebp/1.0.3@bincrafters/stable from 'conan-center' - Cache Packages libwebp/1.0.3@bincrafters/stable:a4d73d2d4a03abfc1a36922919556dad5ab3d20d - Cache

Installing (downloading, building) binaries... libwebp/1.0.3@bincrafters/stable: Already installed! conanfile.txt: Generator txt created conanbuildinfo.txt conanfile.txt: Generator json created conanbuildinfo.json conanfile.txt: Generated conaninfo.txt conanfile.txt: Generated graphinfo running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/webp copying webp/init.py -> build/lib.linux-x86_64-3.7/webp creating build/lib.linux-x86_64-3.7/webp_build copying webp_build/builder.py -> build/lib.linux-x86_64-3.7/webp_build copying webp_build/init.py -> build/lib.linux-x86_64-3.7/webp_build copying webp_build/cdef.h -> build/lib.linux-x86_64-3.7/webp_build copying webp_build/source.c -> build/lib.linux-x86_64-3.7/webp_build running build_ext generating cffi module 'build/temp.linux-x86_64-3.7/_webp.c' creating build/temp.linux-x86_64-3.7 building '_webp' extension creating build/temp.linux-x86_64-3.7/build creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7 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/root/.conan/data/libwebp/1.0.3/bincrafters/stable/package/a4d73d2d4a03abfc1a36922919556dad5ab3d20d/include -I/usr/include/python3.7m -c build/temp.linux-x86_64-3.7/_webp.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_webp.o build/temp.linux-x86_64-3.7/_webp.c:50:14: fatal error: pyconfig.h: No such file or directory

include

            ^~~~~~~~~~~~

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for webp Running setup.py clean for webp Failed to build webp Installing collected packages: webp Running setup.py install for webp ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/setup.py'"'"'; file='"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/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-19d8rc4b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/webp cwd: /tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/ Complete output (49 lines): Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.version=8 os=Linux os_build=Linux [options] [build_requires] [env]

conanfile.txt: Installing package
Requirements
    libwebp/1.0.3@bincrafters/stable from 'conan-center' - Cache
Packages
    libwebp/1.0.3@bincrafters/stable:a4d73d2d4a03abfc1a36922919556dad5ab3d20d - Cache

Installing (downloading, building) binaries...
libwebp/1.0.3@bincrafters/stable: Already installed!
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generator json created conanbuildinfo.json
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/webp
copying webp/__init__.py -> build/lib.linux-x86_64-3.7/webp
creating build/lib.linux-x86_64-3.7/webp_build
copying webp_build/builder.py -> build/lib.linux-x86_64-3.7/webp_build
copying webp_build/__init__.py -> build/lib.linux-x86_64-3.7/webp_build
copying webp_build/cdef.h -> build/lib.linux-x86_64-3.7/webp_build
copying webp_build/source.c -> build/lib.linux-x86_64-3.7/webp_build
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_webp.c'
creating build/temp.linux-x86_64-3.7
building '_webp' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
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/root/.conan/data/libwebp/1.0.3/bincrafters/stable/package/a4d73d2d4a03abfc1a36922919556dad5ab3d20d/include -I/usr/include/python3.7m -c build/temp.linux-x86_64-3.7/_webp.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_webp.o
build/temp.linux-x86_64-3.7/_webp.c:50:14: fatal error: pyconfig.h: No such file or directory
 #    include <pyconfig.h>
              ^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/setup.py'"'"'; file='"'"'/tmp/pip-install-pnp37dq4/webp_25381749d1e7439cbda1a076dd81fbfd/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-19d8rc4b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/webp Check the logs for full command output.

anibali commented 3 years ago

You need the Python development headers to compile C extensions. If you are using Python as packaged in Ubuntu, I think that you can install them with

sudo apt install python3-dev
implementosk commented 3 years ago

Successfully installed webp-0.1.1

Thanks a lot!!!