question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, Sep 28, 2022

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?

1reaction
jcar87commented, 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 https://github.com/conan-io/conan-center-index/issues/12722 as an issue related to the recipe - which needs to be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install conan through cmake - Stack Overflow
On installing cmake and conan in a build file this is the out put ... import run ImportError: No module named conans.conan CMake...
Read more >
Changelog — conan 1.56.0 documentation
Bugfix: Fixed error with cased directory names in Windows. BugFix: Modified confusing warning message in the SCM tool when the remote couldn't be...
Read more >
conanio/conan - Gitter
looking at the conanfile.py I see various package managers, and at the bottom: "package_manager.Pkg(self) ..." I assume this is what conan defaults to...
Read more >
conan Changelog - pyup.io
Feature: Add `stdcpp_library` to `conan.tools.build` to get name of C++ standard library to ... import error (https://github.com/conan-io/conan/pull/12446)
Read more >
cannot import name 'file_hash' from 'pooch.utils' - YouTube
How to resolve ImportError : cannot import name 'file_hash' from 'pooch.utils'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found