Skip to content

Building against libarchive on Windows #38

@voltagex

Description

@voltagex

Windows 10, VS2022 build tools are installed, Python 3.10.10

> pip install python-libarchive
Collecting python-libarchive
  Using cached python-libarchive-4.2.1.tar.gz (58 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-libarchive
  Building wheel for python-libarchive (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-310
      creating build\lib.win32-cpython-310\libarchive
      copying libarchive\tar.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\zip.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\_libarchive.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\__init__.py -> build\lib.win32-cpython-310\libarchive
      running build_ext
      building 'libarchive.__libarchive' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-libarchive
  Running setup.py clean for python-libarchive
Failed to build python-libarchive
Installing collected packages: python-libarchive
  Running setup.py install for python-libarchive ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-libarchive did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running install
      C:\git\archive-test\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-310
      creating build\lib.win32-cpython-310\libarchive
      copying libarchive\tar.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\zip.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\_libarchive.py -> build\lib.win32-cpython-310\libarchive
      copying libarchive\__init__.py -> build\lib.win32-cpython-310\libarchive
      running build_ext
      building 'libarchive.__libarchive' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> python-libarchive

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions