How to install swig

less than 1 minute read

Swig is the abbreviation of Simplified Wrapper and Interface Generator, it can give script language such as python the ability to invoke C and C++ libraries interface method indirectly.

Linux

Debian-based (Debian, Ubuntu, Mint, etc…)

sudo apt-get update
sudo apt-get swig

RPM-based (Red Hat Linux, CentOS, Fedora, openSuse, Mandrake Linux)

sudo yum update
sudo yum install swig

Windows

  1. Download SWIG from http://www.swig.org/download.html.

  2. Unzip the downloaded pack.

  3. Run swig.exe file and follow the steps.

macOS

  1. In the command line, type:
     brew update
     brew upgrade
     brew install swig
     brew cleanup
    

Categories:

Updated:

Leave a comment