There are 4 main ways you can install ScanCode.
- Installation as an Application: Downloading Releases (Recommended)
- Docker Installation
- Installation as a library: via pip
- Installation from Source Code: Git Clone
Before installing ScanCode make sure you've installed the prerequisites properly. This mainly refers to installing the required Python interpreter (Python 3.6 is recommended).
- For Linux(Ubuntu):
sudo apt install python3.6-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev
- For MacOS: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg
- For Windows: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8.exe
Refer Prerequisites for detailed information on all different platforms and Python Versions.
Download and extract the latest ScanCode release from https://github.com/nexB/scancode-toolkit/releases/
Open a terminal window and then cd to the extracted ScanCode directory.
Run this command to self-configure and display the help-text.
- Linux/Mac :
./scancode --help
- Windows :
scancode --help
- Linux/Mac :
Download the Source Code as an archive from the GitHub releases and unzip it, or via git clone.
Build the docker image from the scancode-toolkit directory.:
docker build -t scancode-toolkit .
Mount current working directory and run scan on mounted folder:
docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project
Note that the parameters before scancode-toolkit
are used for docker,
those after will be forwarded to scancode.
Create a Python 3.6 Virtual Environment and activate the same:
virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate
Run
pip install scancode-toolkit[full]
Download the Source Code or Use Git Clone:
git clone https://github.com/nexB/scancode-toolkit.git cd scancode-toolkit
You can jump to any checkpoint/Branch/Commit using the following command:
git checkout master
Run the Configure Script
- On Linux/Mac:
./configure
- On Windows:
configure
Note the Commands will vary across different Installation methods and Platforms.
If this displays the Help Text, you are all set to start using ScanCode.