devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ModuleNotFoundError: No module named 'libfdt' after Installing
@ 2024-11-19 22:31 AbdelRahman Yossef
  2024-11-20  0:54 ` David Gibson
  2024-11-21 20:28 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: AbdelRahman Yossef @ 2024-11-19 22:31 UTC (permalink / raw)
  To: devicetree-compiler

Hi,

After installing the dependencies (swig and python3-dev), I still get
ModuleNotFoundError: No module named 'libfdt'.

I install using pip (pip install
git+git://git.kernel.org/pub/scm/utils/dtc/dtc.git@main) and I got
that It's "Successfully installed".

Thanks,
Abdelrahman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ModuleNotFoundError: No module named 'libfdt' after Installing
  2024-11-19 22:31 ModuleNotFoundError: No module named 'libfdt' after Installing AbdelRahman Yossef
@ 2024-11-20  0:54 ` David Gibson
  2024-11-20  1:30   ` AbdelRahman Yossef
  2024-11-21 20:28 ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: David Gibson @ 2024-11-20  0:54 UTC (permalink / raw)
  To: AbdelRahman Yossef; +Cc: devicetree-compiler

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Wed, Nov 20, 2024 at 12:31:09AM +0200, AbdelRahman Yossef wrote:
> Hi,
> 
> After installing the dependencies (swig and python3-dev), I still get
> ModuleNotFoundError: No module named 'libfdt'.

There's not much to go on here.  What are the steps you're taking, and
what are the results you're expecting?

> 
> I install using pip (pip install
> git+git://git.kernel.org/pub/scm/utils/dtc/dtc.git@main) and I got
> that It's "Successfully installed".
> 
> Thanks,
> Abdelrahman
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ModuleNotFoundError: No module named 'libfdt' after Installing
  2024-11-20  0:54 ` David Gibson
@ 2024-11-20  1:30   ` AbdelRahman Yossef
  0 siblings, 0 replies; 4+ messages in thread
From: AbdelRahman Yossef @ 2024-11-20  1:30 UTC (permalink / raw)
  To: David Gibson; +Cc: devicetree-compiler

I'm trying to run a python script in the linux kernel that uses libfdt.

I guess I'm just expecting to run successfully.

I mean I can't import in a simple python script, I just get this error.

Thanks,

On Wed, Nov 20, 2024 at 2:57 AM David Gibson
<david@gibson.dropbear.id.au> wrote:
>
> On Wed, Nov 20, 2024 at 12:31:09AM +0200, AbdelRahman Yossef wrote:
> > Hi,
> >
> > After installing the dependencies (swig and python3-dev), I still get
> > ModuleNotFoundError: No module named 'libfdt'.
>
> There's not much to go on here.  What are the steps you're taking, and
> what are the results you're expecting?
>
> >
> > I install using pip (pip install
> > git+git://git.kernel.org/pub/scm/utils/dtc/dtc.git@main) and I got
> > that It's "Successfully installed".
> >
> > Thanks,
> > Abdelrahman
> >
>
> --
> David Gibson (he or they)       | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au  | minimalist, thank you, not the other way
>                                 | around.
> http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ModuleNotFoundError: No module named 'libfdt' after Installing
  2024-11-19 22:31 ModuleNotFoundError: No module named 'libfdt' after Installing AbdelRahman Yossef
  2024-11-20  0:54 ` David Gibson
@ 2024-11-21 20:28 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2024-11-21 20:28 UTC (permalink / raw)
  To: AbdelRahman Yossef; +Cc: devicetree-compiler

On Tue, Nov 19, 2024 at 4:31 PM AbdelRahman Yossef
<abdelrahmanyossef12@gmail.com> wrote:
>
> Hi,
>
> After installing the dependencies (swig and python3-dev), I still get
> ModuleNotFoundError: No module named 'libfdt'.
>
> I install using pip (pip install
> git+git://git.kernel.org/pub/scm/utils/dtc/dtc.git@main) and I got
> that It's "Successfully installed"

In general, I don't think pip works with pylibfdt in dtc repo. I gave
up trying to get something that worked with pip. And make. And meson.
So I packaged pylibfdt for pip/pypi here:

https://github.com/devicetree-org/pylibfdt/

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-21 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 22:31 ModuleNotFoundError: No module named 'libfdt' after Installing AbdelRahman Yossef
2024-11-20  0:54 ` David Gibson
2024-11-20  1:30   ` AbdelRahman Yossef
2024-11-21 20:28 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).