Skip to content

Latest commit

 

History

History
81 lines (49 loc) · 3.06 KB

INSTALL.rst

File metadata and controls

81 lines (49 loc) · 3.06 KB

Installation

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

Prerequisites

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).

Refer Prerequisites for detailed information on all different platforms and Python Versions.

Installation as an Application : Downloading Releases

  1. Download and extract the latest ScanCode release from https://github.com/nexB/scancode-toolkit/releases/

  2. Open a terminal window and then cd to the extracted ScanCode directory.

  3. Run this command to self-configure and display the help-text.

    • Linux/Mac : ./scancode --help
    • Windows : scancode --help

Docker Installation

  1. Download the Source Code as an archive from the GitHub releases and unzip it, or via git clone.

  2. Build the docker image from the scancode-toolkit directory.:

    docker build -t scancode-toolkit .
    
  3. 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.

Installation as a library: via pip

  1. Create a Python 3.6 Virtual Environment and activate the same:

    virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate
    
  2. Run pip install scancode-toolkit[full]

Installation from Source Code: Git Clone

  1. Download the Source Code or Use Git Clone:

    git clone https://github.com/nexB/scancode-toolkit.git
    cd scancode-toolkit
    
  2. You can jump to any checkpoint/Branch/Commit using the following command:

    git checkout master
    
  3. 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.