Failed to build libewf-python

I tried to install this package on windows termainl with admin like that:

pip install libewf-python

but I got this error . What I should do to fix it ?

Failed to build libewf-python
ERROR: Could not build wheels for libewf-python, which is required to install pyproject.toml-based projects

Maybe some information there:

No Windows example

The page linked has a bunch of Windows-related examples (“MinGW” and “Visual Studio”).

dont know how to use these “MinGW” and “Visual Studio”

What is the full error message?

1 Like

I copied the previous lines here:

         Creating library build\temp.win-amd64-cpython-312\Release\libbfio\pyewf.cp312-win_amd64.lib and object build\temp.win-amd64-cpython-312\Release\libbfio\pyewf.cp312-win_amd64.exp
      pyewf.obj : error LNK2001: unresolved external symbol PyUnicode_AsUnicode
      build\lib.win-amd64-cpython-312\pyewf.cp312-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for libewf-python
Failed to build libewf-python
ERROR: Could not build wheels for libewf-python, which is required to install pyproject.toml-based projects

@freeme1 This package is not written in pure Python, it includes a C library which needs to be compiled, and there are no precompiled package for Windows provided by its developers, so installing it is necessarily going to be involved and you will not necessarily find easy, step-by-step, fool-proof instructions. Be prepared for learning about MinGW and/or Visual Studio and setting up a C compilation environment.

3 Likes