Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] [1.52] conan error "ImportError: cannot import name '_get_component_name' from 'conan.tools.gnu.pkgconfigdeps'" #12000

Open
zhoupeng6d opened this issue Sep 1, 2022 · 23 comments
Assignees

Comments

@zhoupeng6d
Copy link

Environment Details (include every applicable attribute)

  • Operating System+version: ubuntu 20.04
  • Compiler+version: none
  • Conan version: 1.52
  • Python version: 3.8

Steps to reproduce (Include if Applicable)

pip3 install conan==1.52
conan --version

Logs (Executed commands with output) (Include/Attach if Applicable)

conan --version
Traceback (most recent call last):
  File "/home/dash/.local/bin/conan", line 7, in <module>
    from conans.conan import run
  File "/home/dash/.local/lib/python3.8/site-packages/conans/conan.py", line 7, in <module>
    from conans.client.command import main
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/command.py", line 14, in <module>
    from conans.client.conan_api import Conan, default_manifest_folder, _make_abs_path, ProfileData
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/conan_api.py", line 13, in <module>
    from conans.client.cmd.create import create
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/cmd/create.py", line 3, in <module>
    from conans.client.cmd.test import install_build_and_test
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/cmd/test.py", line 6, in <module>
    from conans.client.manager import deps_install
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/manager.py", line 7, in <module>
    from conans.client.installer import BinaryInstaller, call_system_requirements
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/installer.py", line 11, in <module>
    from conans.client.generators import TXTGenerator, write_toolchain
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/generators/__init__.py", line 23, in <module>
    from .markdown import MarkdownGenerator
  File "/home/dash/.local/lib/python3.8/site-packages/conans/client/generators/markdown.py", line 12, in <module>
    from conan.tools.gnu.pkgconfigdeps import (
ImportError: cannot import name '_get_component_name' from 'conan.tools.gnu.pkgconfigdeps' (/home/dash/.local/lib/python3.8/site-packages/conan/tools/gnu/pkgconfigdeps/__init__.py)
@Zvicii
Copy link

Zvicii commented Sep 1, 2022

encountered a similar problem.

-- Conan: Adding conancenter remote repository (https://center.conan.io) verify ssl (True)
-- Conan: Adding NetEaseConan remote repository (http://yunxin-conan.netease.im:8082/artifactory/api/conan/NetEaseConan) verify ssl (True)
-- Conan: checking conan executable
-- Conan: Found program /opt/pyenv/versions/3.7.13/bin/conan
-- Conan: Version found Conan version 1.52.0
-- Conan executing: /opt/pyenv/versions/3.7.13/bin/conan install /home/conan/workspace/nim-cross-platform-sdk --build missing --build libevent --build libuv --build expat --settings build_type=Release --settings compiler=gcc --settings compiler.version=7 --settings compiler.libcxx=libstdc++11 --settings compiler.cppstd=17
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

Current platform: Linux
WARN: qt/5.15.4: requirement openssl/1.1.1q overridden by nim/None to openssl/1.1.1n 
ERROR: wayland/1.21.0: Cannot load recipe.
Error loading conanfile at '/home/conan/.conan/data/wayland/1.21.0/_/_/export/conanfile.py': Unable to load conanfile in /home/conan/.conan/data/wayland/1.21.0/_/_/export/conanfile.py
  File "/opt/pyenv/versions/3.7.13/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/conan/.conan/data/wayland/1.21.0/_/_/export/conanfile.py", line 5, in <module>
    from conan.tools.gnu.pkgconfigdeps.pc_files_creator import get_pc_files_and_content
ModuleNotFoundError: No module named 'conan.tools.gnu.pkgconfigdeps.pc_files_creator'; 'conan.tools.gnu.pkgconfigdeps' is not a package

@jcar87 jcar87 self-assigned this Sep 1, 2022
@jcar87
Copy link
Contributor

jcar87 commented Sep 1, 2022

Hi @zhoupeng6d - I have try to reproduce this on Ubuntu 20.04 with Python 3.8 and I'm unable to. I can install conan==1.52 with pip and conan --version reports the correct version without issues.

Could you try to isolate this to a new virtual environment to discard any issues with your python environment in .local? You may need to install the python3-venv Ubuntu package.

python3 -m venv conan-venv
source conan-venv/bin/activate
pip install conan==1.52
conan --version

@jcar87
Copy link
Contributor

jcar87 commented Sep 1, 2022

Hi @Zvicii - thank you for reporting this issue. There was an issue with the wayland recipe in conan-center-index where a private Conan API was used, and it changed internally across Conan versions. We are tracking this here conan-io/conan-center-index#12722 as an issue related to the recipe - which needs to be fixed.

@zhoupeng6d
Copy link
Author

zhoupeng6d commented Sep 4, 2022

Hi @jcar87 Using venv looks OK.

~ python3.8 -m venv conan-venv
➜  ~ source conan-venv/bin/activate
(conan-venv) ➜  ~ pip3 install conan==1.52
Collecting conan==1.52
  Using cached conan-1.52.0.tar.gz (770 kB)
  Preparing metadata (setup.py) ... done
Collecting requests<3.0.0,>=2.25
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting urllib3<1.27,>=1.26.6
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting colorama<0.5.0,>=0.3.3
  Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB)
Collecting PyYAML<=6.0,>=3.11
  Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
Collecting patch-ng<1.18,>=1.17.4
  Using cached patch-ng-1.17.4.tar.gz (17 kB)
  Preparing metadata (setup.py) ... done
Collecting fasteners>=0.14.1
  Using cached fasteners-0.17.3-py3-none-any.whl (18 kB)
Collecting six<=1.16.0,>=1.10.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting node-semver==0.6.1
  Using cached node_semver-0.6.1-py3-none-any.whl (10 kB)
Collecting pygments<3.0,>=2.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting tqdm<5,>=4.28.1
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting python-dateutil<3,>=2.7.0
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting bottle<0.13,>=0.12.8
  Using cached bottle-0.12.23-py3-none-any.whl (90 kB)
Collecting pluginbase>=0.5
  Using cached pluginbase-1.0.1.tar.gz (43 kB)
  Preparing metadata (setup.py) ... done
Collecting PyJWT<3.0.0,>=2.4.0
  Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB)
Collecting Jinja2<4.0.0,>=3.0
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting distro<=1.6.0,>=1.0.2
  Using cached distro-1.6.0-py2.py3-none-any.whl (19 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Using legacy 'setup.py install' for conan, since package 'wheel' is not installed.
Using legacy 'setup.py install' for patch-ng, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pluginbase, since package 'wheel' is not installed.
Installing collected packages: pluginbase, patch-ng, node-semver, distro, bottle, urllib3, tqdm, six, PyYAML, PyJWT, pygments, MarkupSafe, idna, fasteners, colorama, charset-normalizer, certifi, requests, python-dateutil, Jinja2, conan
  Running setup.py install for pluginbase ... done
  Running setup.py install for patch-ng ... done
  Running setup.py install for conan ... done
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 PyJWT-2.4.0 PyYAML-6.0 bottle-0.12.23 certifi-2022.6.15 charset-normalizer-2.1.1 colorama-0.4.5 conan-1.52.0 distro-1.6.0 fasteners-0.17.3 idna-3.3 node-semver-0.6.1 patch-ng-1.17.4 pluginbase-1.0.1 pygments-2.13.0 python-dateutil-2.8.2 requests-2.28.1 six-1.16.0 tqdm-4.64.1 urllib3-1.26.12
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/home/dash/conan-venv/bin/python3.8 -m pip install --upgrade pip' command.
(conan-venv) ➜  ~
(conan-venv) ➜  ~ conan --version
WARN: Migration: Updating settings.yml
WARN: ****************************************
WARN: settings.yml is locally modified, can't be updated
WARN: The new settings.yml has been stored in: /home/dash/.conan/settings.yml.new
WARN: ****************************************
Conan version 1.52.0

@memsharded
Copy link
Member

@zhoupeng6d then it could be that your Conan installation is corrupted. I would try to remove and re-install Conan, because a 1.52 clean installation seems to be ok.

@tuxflo
Copy link

tuxflo commented Sep 20, 2022

I'm facing the same problem (Ubuntu 20.04 in WSL). Already tried a pip3 uninstall conan and then a reinstall using pip3 install --upgrade conan==1.52.0 but this didn't help.
Kind of sad, that the latest releases cause so much trouble (had to fight with the is_apple_os thing just last week).

@jcar87
Copy link
Contributor

jcar87 commented Sep 20, 2022

I'm facing the same problem (Ubuntu 20.04 in WSL). Already tried a pip3 uninstall conan and then a reinstall using pip3 install --upgrade conan==1.52.0 but this didn't help. Kind of sad, that the latest releases cause so much trouble (had to fight with the is_apple_os thing just last week).

Hi @tuxflo - is this the same error as reported in this issue, with ImportError: cannot import name when running conan --version? If this is the case I can try and provide further assistance.

Some of the other issues, for example with is_apple_us, had to do with a small number of recipes in Conan Center using private/undocumented APIs temporarily (these may change across releases). We fixed the recipes in Conan Center as soon as we noticed and using the most recent revisions should work fine. Many apologies for this.

@tuxflo
Copy link

tuxflo commented Sep 20, 2022

Yes it's exactly the same issue using 1.52.0 failed with the exact same error message as in the first post.
Downgrading to conan version < 1.52.0 was problematic because the latest recipe for libcurl (libcurl/7.77.0) already uses the is_apple_os import which isn't working with 1.51.3.
Currently I "solved" this by adding the revision number to the conanfile of the dependency lib and sticking to version 1.51.3 but it's still more a workaround then a solution.
BTW: installing in a new pyenv works as mentioned above, but I'd like to use conan on the system level rather that dealing with virtual environments.

@memsharded
Copy link
Member

Just in case, can you confirm that the exact same issue is from wayland recipe and error message is ModuleNotFoundError: No module named 'conan.tools.gnu.pkgconfigdeps.pc_files_creator'. Maybe it is from another (internal) recipe and not wayland? Because I cannot longer find pc_files_creator in whole conan-center-index repo, this could be some cached recipe somewhere, not a Conan issue, but a recipe issue that hasn't upgraded or is cached?

@SergeyKrivohatskiy
Copy link

Hi! I have the same issue with conan==1.52.0
Running conan remote add --insert -f blabla http://blabla/
Crashes:

Traceback (most recent call last):
18:56:33     File "/usr/local/bin/conan", line 11, in <module>
18:56:33       load_entry_point('conan==1.52.0', 'console_scripts', 'conan')()
18:56:33     File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
18:56:33       return get_distribution(dist).load_entry_point(group, name)
18:56:33     File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
18:56:33       return ep.load()
18:56:33     File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
18:56:33       return self.resolve()
18:56:33     File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
18:56:33       module = __import__(self.module_name, fromlist=['__name__'], level=0)
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/conan.py", line 7, in <module>
18:56:33       from conans.client.command import main
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/command.py", line 14, in <module>
18:56:33       from conans.client.conan_api import Conan, default_manifest_folder, _make_abs_path, ProfileData
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/conan_api.py", line 13, in <module>
18:56:33       from conans.client.cmd.create import create
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/cmd/create.py", line 3, in <module>
18:56:33       from conans.client.cmd.test import install_build_and_test
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/cmd/test.py", line 6, in <module>
18:56:33       from conans.client.manager import deps_install
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/manager.py", line 7, in <module>
18:56:33       from conans.client.installer import BinaryInstaller, call_system_requirements
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/installer.py", line 11, in <module>
18:56:33       from conans.client.generators import TXTGenerator, write_toolchain
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/generators/__init__.py", line 23, in <module>
18:56:33       from .markdown import MarkdownGenerator
18:56:33     File "/usr/local/lib/python3.6/site-packages/conans/client/generators/markdown.py", line 12, in <module>
18:56:33       from conan.tools.gnu.pkgconfigdeps import (
18:56:33   ImportError: cannot import name '_get_component_name'

I also cannot use conan 1.51.3 as it doesn't support latest packages. So I'm stuck =(

@memsharded
Copy link
Member

Hi @SergeyKrivohatskiy

It seems that some updates to 1.52 are not completely cleaning the previous stuff and something breaks. Can you please try installing a fresh Conan in a clean Python virtualenv (or maybe trying pipx), and see if the problem still reproduces?

@SergeyKrivohatskiy
Copy link

@memsharded Thanks that helped me to solve the issue.
The problem was in --ignore-installed flag I used to reinstall conan.

So to reproduce:

pip install conan==1.51.0 # or any other earlier version
pip install conan==1.52.0 --ignore-installed
conan --version # this crashes

without --ignore-installed flag everything works.

Hope this will help someone else =)

@memsharded
Copy link
Member

Perfect, thanks for the feedback @SergeyKrivohatskiy !!

That is a good hint, yes, the key seems to be in not complete/clean installations, first thing to try is a full clean one. Cheers!

@jbrownsw
Copy link

I just ran into this as well. I was able to resolve it by uninstalling multiple times. Each subsequent uninstall removed an older previously installed version of conan then when I was all done I just installed and it worked. In my case I was trying to just get back to the latest of 1.56.0 and that wasn't working, but I assume the same trick will work if you wanted to go to 1.52.0 or any other version.

$ pip3 uninstall conan
Uninstalling conan-1.56.0:
  Successfully uninstalled conan-1.56.0
$ pip3 uninstall conan
Uninstalling conan-1.55.0:
  Successfully uninstalled conan-1.55.0
$ pip3 uninstall conan
Uninstalling conan-1.54.0:
  Successfully uninstalled conan-1.54.0
$ pip3 uninstall conan
Uninstalling conan-1.53.0:
  Successfully uninstalled conan-1.53.0
$ pip3 uninstall conan
Uninstalling conan-1.52.0:
  Successfully uninstalled conan-1.52.0
$ pip3 uninstall conan
Uninstalling conan-1.51.0:
  Successfully uninstalled conan-1.51.0
$ pip3 uninstall conan
Uninstalling conan-1.51.0:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.6/shutil.py", line 550, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/conan' -> '/tmp/pip-4aj4qofk-uninstall/usr/local/bin/conan'
$ pip3 install conan
$ conan --version
Conan version 1.56.0

@memsharded
Copy link
Member

Hi @jbrownsw

Are you using python virtualenvs to manage different versions of Conan? It might be a good practice, those virtualenvs you can create new ones for new versions, try them side-by-side with the previous version, then destroy the past virtualenvs when you don't need those versions anymore.

@Korky
Copy link

Korky commented Feb 22, 2023

I was getting same issue fresh installing conan 1.52 fixed it, when conan was installed from ue4cli install it installed conan 2.0

@memsharded
Copy link
Member

Yes, Conan 2.0 was officially released today.
If that ue4cli is incompatible with 2.0, it should be pinning a conan<2.0 until it is made compatible, I suggest posting an issue in their tracker if possible (a link here to that project would also be interesting)

liuyangc3 added a commit to liuyangc3/base64pp that referenced this issue Mar 10, 2023
matheusgomes28 pushed a commit to matheusgomes28/base64pp that referenced this issue Mar 10, 2023
* fix typo

* try to fix CI

conan-io/conan#12000
matheusgomes28 added a commit to matheusgomes28/base64pp that referenced this issue Mar 12, 2023
* fix typo

* try to fix CI

conan-io/conan#12000

* Update conan-install.sh

* Update conan-install.sh

* fix output dir

* fix generators

* fix cmake version

* fix share dir

* set build type to Debug

* Update build_x86-64.sh

* Update build_x86-64.sh

Don't need these changes now

* Update conan-install.sh

Don't need sudo here

* Update CMakeLists.txt

Dont need this afaik

---------

Co-authored-by: matheusgomes28 <matheusgarcia28@gmail.com>
@Pat-re
Copy link

Pat-re commented Mar 28, 2023

It's still happening! Mac os 13

pip 23.0.1 from /Users/******/Library/Python/3.9/lib/python/site-packages/pip (python 3.9)
% python --version
Python 3.9.6

I tried the venv stuff,
python3 -m venv conan-venv
source conan-venv/bin/activate
pip install conan==1.52

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=14
os=Macos

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=14
os=Macos

======== Computing dependency graph ========
Graph root
conanfile.txt: /Users/john.doe/reports/dtrack/examples/libraries/dear-imgui/basic/conanfile.txt


Recipe 'imgui/1.74' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0


ERROR: Package 'imgui/1.74' not resolved: imgui/1.74: Cannot load recipe.
Error loading conanfile at '/Users/john.doe/.conan2/p/imguied15c63f383bf/e/conanfile.py': Unable to load conanfile in /Users/john.doe/.conan2/p/imguied15c63f383bf/e/conanfile.py
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/john.doe/.conan2/p/imguied15c63f383bf/e/conanfile.py", line 1, in
from conans import ConanFile, CMake, tools
ImportError: cannot import name 'ConanFile' from 'conans' (/Users/john.doe/Library/Python/3.9/lib/python/site-packages/conans/init.py)

(conan-venv) john.doe@REMAC1MACHINE build % pip install conans
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement conans (from versions: none)
ERROR: No matching distribution found for conans
(conan-venv) john.doe@REMAC1MACHINE build % conan --version
Conan version 2.0.2
(conan-venv) john.doe@REMAC1MACHINE build %

@memsharded
Copy link
Member

Hi @Pat-re

Thanks for your report.
It seems that you are reporting a different issue. The output you are showing is output from Conan 2.0, not from Conan 1.52

You should be checking conan --version before calling Conan.
If it is not 1.52, then there is something wrong in your system, maybe you have a system wide installation of 2.0 or something like that.

Side note: It is expected that Conan 2.0 might be failing for some packages in ConanCenter that hasn't been upgraded to Conan 2.0 yet. The upgrade efforts can be tracked in: conan-io/conan-center-index#16196

@Pat-re
Copy link

Pat-re commented Mar 29, 2023

Hi Memsharded;
Right now Conan2 is the default version when using pip3 t install. Maybe that package should be held back until it is ready for primetime?

@memsharded
Copy link
Member

Conan 2.0 is ready for prime time. Is a much better version than 1.X and it has been iterated in 6 alphas, 10 beta releases during more than 1 year and a half. Of course it will have some issues, as expected from a major release like this one, but those are being fixed quickly, we already did 2.0.1 and 2.0.2 fixing many of those things.

A different thing is that not all recipes in ConanCenter are ready from prime time, but around the 80% of most downloaded ones was the threshold that was defined (which accounts for around 120 recipes) for the 2.0 release. ConanCenter contains aprox 1500 recipes and it will take too much time to upgrade all of them to 2.0. But that is a different thing. Conan is massively used in the enterprise without depending on ConanCenter recipes, actually our estimation is that around 70-80% of users do not depend on ConanCenter binaries.

@karambaq
Copy link

Same error here:

Collecting webp==0.1.3
  Using cached webp-0.1.3.tar.gz (10 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  ? Preparing metadata (pyproject.toml) did not run successfully.
  ? exit code: 1
  ??> [33 lines of output]
      Traceback (most recent call last):
        File "/Users/main/project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/main/project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/main/project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 10, in <module>
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 488, in __init__
          _Distribution.__init__(
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 912, in finalize_options
          ep(self)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 932, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/cffi/setuptools_ext.py", line 219, in cffi_modules
          add_cffi_module(dist, cffi_module)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
          execfile(build_file_name, mod_vars)
        File "/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/cffi/setuptools_ext.py", line 25, in execfile
          exec(code, glob, glob)
        File "webp_build/builder.py", line 7, in <module>
          from conans.client import conan_api
      ImportError: cannot import name 'conan_api' from 'conans.client' (/private/var/folders/d6/g22rwyy95438yl9kcz0hq09r0000gn/T/pip-build-env-n4iozlav/overlay/lib/python3.10/site-packages/conans/client/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

? Encountered error while generating package metadata.
??> See above for output.

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

@memsharded
Copy link
Member

Hi @karambaq

If you could please detail a bit more about your environment, as the error you are seeing is not the same as reported there. So please, if you could include:

  • The OS and distro, version you are running
  • The Python base distribution you are running
  • The steps to reproduce the failure, if it is using venv, the instructions to create the venv, then the instructions to install Conan

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants