Skip to content

Nirjas Installation Guide

Ayush Bhardwaj edited this page Jul 7, 2020 · 2 revisions

To extract comments or source code from the files, you need to install Nirjas library on your system. You can install & use Nirjas on any machine(Mac, Linux or Windows) with Python3 pre-installed.

Before you go any further, make sure you have Python and that the expected version(v3+) is available from your command line. You can check this by running:

python --version

You should get some output like Python 3.6.3. If you do not have Python, please follow these steps:

  • Installing Python on Linux machines:
$ sudo apt-get install python3 python3-pip
  • For macOS and Windows, packages are available at python.org

To set up a Python Virtual environment, please check out Setting up a Python Virtual Environment

1. Install Nirjas using pip

You’ll need to make sure you have pip available. You can check this by running:

pip --version

If you installed Python from source, with an installer from python.org, you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately.

Haven’t installed pip? Visit: https://pip.pypa.io/en/stable/installing/

Install the latest official release via pip. This is the best approach for most users. It will provide a stable version and are available for most platforms.

  • Update pip to the latest stable version
pip3 install --upgrade pip
  • Install Nirjas
pip3 install -i https://test.pypi.org/simple/ Nirjas==0.0.4
  • Upgrading Nirjas

Upgrade already installed Nirjas library to the latest version from PyPI.

pip install --upgrade Nirjas

2. Install Nirjas using source

If you are interested in contributing to Nirjas development, running the latest source code, or just like to build everything yourself, it is not difficult to install & build Nirjas from the source.

  • Fork the repo

  • Clone on your local system

git clone https://github.com/fossology/Nirjas.git 
  • Change directory
cd Nirjas/
  • Install the package
pip install .

This will install Nirjas on your system.

  • Check if Nirjas is installed correctly or get help, Run:

    nirjas -h or nirjas --help

Clone this wiki locally