There are a few ways you can install ScanCode.
- pip install a Python PyPI package
- from source code using a git clone
- using Docker
Before installing ScanCode make sure you have installed these prerequisites. The main one is to have Python installed version 3.6, 3.7, 3.8 or 3.9.
sudo apt install python3.6-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev
Refer Prerequisites for detailed information on all different operating systems and Python versions.
Download and extract the latest ScanCode release from https://github.com/nexB/scancode-toolkit/releases/
Open a terminal window (or command prompt on Windows) and then cd to the extracted ScanCode directory.
Run this command to self-configure and display the initial command line help:
- Linux/Mac :
./scancode --help
- Windows :
scancode --help
Create a virtual environment for Python 3.x and activate it:
virtualenv -p python3 venv-scancode && source venv-scancode/bin/activate
Run pip install scancode-toolkit[full]
Note that the [full]
extra option is required to get a working installation
except in some advanced use cases.
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 a scan the 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 by docker and
those after will be forwarded to scancode.
Download the Source Code or Use Git Clone:
git clone https://github.com/nexB/scancode-toolkit.git cd scancode-toolkit
Run the configure script for development usage:
./configure --dev
configure --dev
If this displays the help text, you are all set to start using ScanCode.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。