anibali / pywebp

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

pip install error `Unable to find 'libwebp/1.0.3@bincrafters/stable' in remotes` #28

Closed AdrianTeng closed 3 years ago

AdrianTeng commented 3 years ago

When I was running pip install webp on my machine (I've tried Mac OSX locally running python 3.9, and Ubuntu 20.04 on Goolge Cloud running python 3.7), the following error occurs.

It seems the fault lies in conan's central repositry having problem?

  Using cached webp-0.1.0.tar.gz (10 kB)
    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-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/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-vgixepwg
         cwd: /tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/
    Complete output (71 lines):
    Configuration:
    [settings]
    arch=x86_64
    arch_build=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++
    compiler.version=7
    os=Linux
    os_build=Linux
    [options]
    [build_requires]
    [env]

    libwebp/1.0.3@bincrafters/stable: Not found in local cache, looking in remotes...
    libwebp/1.0.3@bincrafters/stable: Trying with 'conancenter'...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/setup.py", line 24, in <module>
        'License :: OSI Approved :: MIT License',
      File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 456, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 807, in finalize_options
        ep(self)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 814, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "/usr/local/lib/python3.7/dist-packages/cffi/setuptools_ext.py", line 219, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "/usr/local/lib/python3.7/dist-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "/usr/local/lib/python3.7/dist-packages/cffi/setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "webp_build/builder.py", line 14, in <module>
        conan.install(path=getcwd(), cwd=tmp_dir)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/conan_api.py", line 93, in wrapper
        return f(api, *args, **kwargs)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/conan_api.py", line 620, in install
        require_overrides=require_overrides)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/manager.py", line 61, in deps_install
        require_overrides=require_overrides)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_manager.py", line 122, in load_graph
        apply_build_requires=apply_build_requires)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_manager.py", line 282, in _resolve_graph
        graph_lock=graph_lock)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_manager.py", line 385, in _load_graph
        profile_build, graph_lock)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 67, in load_graph
        update, remotes, profile_host, profile_build, graph_lock)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 133, in _expand_node
        context_switch=False)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 249, in _expand_require
        populate_settings_target=populate_settings_target)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 442, in _create_new_node
        remotes, profile, graph_lock)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 407, in _resolve_recipe
        raise e
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/graph_builder.py", line 402, in _resolve_recipe
        remotes, self._recorder)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/proxy.py", line 37, in get_recipe
        result = self._get_recipe(layout, ref, check_updates, update, remotes, recorder)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/proxy.py", line 54, in _get_recipe
        recorder)
      File "/tmp/pip-install-kde4udh1/webp_e50a0efe43e94741af23b6ff41438837/.eggs/conan-1.40.0-py3.7.egg/conans/client/graph/proxy.py", line 173, in _download_recipe
        raise NotFoundException(msg)
    conans.errors.NotFoundException: Unable to find 'libwebp/1.0.3@bincrafters/stable' in remotes
anibali commented 3 years ago

Thanks for the report, I was able to reproduce the error. I believe that this may be a result of JFrog ending Bintray (https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). In any case, the remote which previously provided the libwebp binary no longer works.

I have changed the remote for the libwebp binary in https://github.com/anibali/pywebp/commit/9ab568a841902e9322f38643cf7c2c57281d9a30 which fixed the issue. Expect a new release of webp on PyPI soon.

anibali commented 3 years ago

I have released v0.1.2 which should fix this issue.

AdrianTeng commented 3 years ago

Can confirm webp==0.1.2 solves this problem. Thanks!

FeraruSilviuMarian commented 3 years ago

strange how that fixed it for you, me I'm still getting an error

pip install webp==0.1.2
Collecting webp==0.1.2
  Using cached webp-0.1.2.tar.gz (11 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\silve\appdata\local\programs\python\python38-32\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\silve\\AppData\\Local\\Temp\\pip-install-ylqq_zhf\\webp_cec84fac609240ca956649ac650f0e59\\setup.py'"'"'; __file__='"'"'C:\\Users\\silve\\AppData\\Local\\Temp\\pip-install-ylqq_zhf\\webp_cec84fac609240ca956649ac650f0e59\\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 'C:\Users\silve\AppData\Local\Temp\pip-pip-egg-info-a7j9w69f'
         cwd: C:\Users\silve\AppData\Local\Temp\pip-install-ylqq_zhf\webp_cec84fac609240ca956649ac650f0e59\
    Complete output (71 lines):
    Configuration:
    [settings]
    arch=x86_64
    arch_build=x86_64
    build_type=Release
    os=Windows
    os_build=Windows
    [options]
    [build_requires]
    [env]

    Traceback (most recent call last):
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 326, in _config_node
        run_configure_method(conanfile, down_options, down_ref, ref)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\conanfile\configure.py", line 29, in run_configure_method
        conanfile.settings.validate()  # All has to be ok!
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\model\settings.py", line 244, in validate
        child.validate()
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\model\settings.py", line 189, in validate
        raise undefined_value(self._name)
    conans.errors.ConanException: 'settings.compiler' value not defined

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\silve\AppData\Local\Temp\pip-install-ylqq_zhf\webp_cec84fac609240ca956649ac650f0e59\setup.py", line 6, in <module>
        setup(
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 445, in __init__
        _Distribution.__init__(self, {
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 292, in __init__
        self.finalize_options()
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 734, in finalize_options
        ep.load()(self, ep.name, value)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\cffi\setuptools_ext.py", line 219, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "webp_build/builder.py", line 14, in <module>
        conan.install(path=getcwd(), cwd=tmp_dir)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\conan_api.py", line 93, in wrapper
        return f(api, *args, **kwargs)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\conan_api.py", line 598, in install
        deps_install(app=self.app,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\manager.py", line 57, in deps_install
        deps_graph = graph_manager.load_graph(ref_or_path, create_reference, graph_info, build_modes,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_manager.py", line 118, in load_graph
        deps_graph = self._resolve_graph(root_node, profile_host, profile_build, graph_lock,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_manager.py", line 263, in _resolve_graph
        deps_graph = self._load_graph(root_node, check_updates, update,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_manager.py", line 373, in _load_graph
        graph = builder.load_graph(root_node, check_updates, update, remotes, profile_host,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 66, in load_graph
        self._expand_node(root_node, dep_graph, Requirements(), None, None, check_updates,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 128, in _expand_node
        self._expand_require(require, node, graph, check_updates, update, remotes, profile_host,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 233, in _expand_require
        self._expand_node(new_node, graph, new_reqs, node.ref, new_options, check_updates,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 121, in _expand_node
        new_options, new_reqs = self._get_node_requirements(node, graph, down_ref, down_options,
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 155, in _get_node_requirements
        new_options = self._config_node(node, down_ref, down_options)
      File "c:\users\silve\appdata\local\programs\python\python38-32\lib\site-packages\conans\client\graph\graph_builder.py", line 350, in _config_node
        raise ConanException("%s: %s" % (ref or "Conanfile", str(e)))
    conans.errors.ConanException: libwebp/1.0.3: 'settings.compiler' value not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/16/60/be7e03cd6423308a5e7bbeace6e7eb612172534734043d8ffbae77862df3/webp-0.1.2.tar.gz#sha256=3d71b890ffdf39dcda02086f28fe66727f06b3a4854ec8e86d1318628c3ff044 (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==0.1.2 (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, 0.1.2)
ERROR: No matching distribution found for webp==0.1.2
anibali commented 3 years ago

@FeraruSilviuMarian That's a different error, and I think it's now key to your issue in https://github.com/anibali/pywebp/issues/27. Let's continue the discussion there please.