Skip to content

error: command 'swig' failed: No such file or directory #19

@mxmlnkn

Description

@mxmlnkn

After trying to upgrade from 4.0.1.post1 to 4.1.0-1, I'm getting an error during the installation, which wasn't the case before. Also, I want to suggest adhering somewhat to SemVer.

I'm on Ubuntu 22.04 with Python 3.10.4 and pip 22.0.2

pip3 install --user --upgrade python-libarchive

pip3 install --user --upgrade python-libarchive
Requirement already satisfied: python-libarchive in /home/user/.local/lib/python3.10/site-packages (4.0.1.post1)
Collecting python-libarchive
  Downloading python-libarchive-4.1.0.post1.tar.gz (22 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
  ╰─> [17 lines of output]
      /home/user/.local/lib/python3.10/site-packages/setuptools/dist.py:530: UserWarning: Normalizing '4.1.0-1' to '4.1.0.post1'
        warnings.warn(tmpl.format(**locals()))
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/__init__.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/_libarchive.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/zip.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/tar.py -> build/lib.linux-x86_64-cpython-310/libarchive
      running build_ext
      building 'libarchive.__libarchive' extension
      swigging libarchive/_libarchive.i to libarchive/_libarchive_wrap.c
      swig -python -o libarchive/_libarchive_wrap.c libarchive/_libarchive.i
      error: command 'swig' failed: No such file or directory
      [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
pInstalling collected packages: python-libarchive
  Attempting uninstall: python-libarchive
    Found existing installation: python-libarchive 4.0.1.post1
    Uninstalling python-libarchive-4.0.1.post1:
      Successfully uninstalled python-libarchive-4.0.1.post1
  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
  ╰─> [19 lines of output]
      /home/user/.local/lib/python3.10/site-packages/setuptools/dist.py:530: UserWarning: Normalizing '4.1.0-1' to '4.1.0.post1'
        warnings.warn(tmpl.format(**locals()))
      running install
      /home/user/.local/lib/python3.10/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.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/__init__.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/_libarchive.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/zip.py -> build/lib.linux-x86_64-cpython-310/libarchive
      copying libarchive/tar.py -> build/lib.linux-x86_64-cpython-310/libarchive
      running build_ext
      building 'libarchive.__libarchive' extension
      swigging libarchive/_libarchive.i to libarchive/_libarchive_wrap.c
      swig -python -o libarchive/_libarchive_wrap.c libarchive/_libarchive.i
      error: command 'swig' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  WARNING: No metadata found in /home/user/.local/lib/python3.10/site-packages
  Rolling back uninstall of python-libarchive
  Moving to /home/user/.local/lib/python3.10/site-packages/libarchive/
   from /home/user/.local/lib/python3.10/site-packages/~ibarchive
  Moving to /home/user/.local/lib/python3.10/site-packages/python_libarchive-4.0.1.post1.dist-info/
   from /home/user/.local/lib/python3.10/site-packages/~ython_libarchive-4.0.1.post1.dist-info
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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions