Setup#

Main Requirements 📝#

Python:

  • For regular usage: >= 3.6

  • For development (editable install, build from source, etc): >= 3.7

Platform:

  • Install from a pre-built binary: Linux x86 (only Ubuntu is tested)

  • Building from source: Not tested, potentially all platforms

Getting Started 🚀#

Follow these steps to setup the environment and install the akkits SDK.

Ideally, you should create a Python virtual environment that is separate from the system environment. We provide a guide for creating an Anaconda environment below, but you can use other methods such as venv.

  • For end users who just want to use the SDK:

    1. Install akkits from PyPI

      $ python3 -m pip install akkits
      

      Tip

      You can list all the available versions by doing:

      $ python3 -m pip install akkits==
      
    2. Done 🎉

  • For developers who want to develop the SDK:

    1. Clone the repo:

      $ git clone https://dev.azure.com/akirakan/_git/ITSPythonSDK
      
      • By default, this is the development / unstable version.

      • To use a stable release instead, checkout a specific tag / version (for example 1.0.0).

        $ git clone --depth 1 -b <git-tag> https://dev.azure.com/akirakan/_git/ITSPythonSDK
        

        Caution

        Pre-release install tags are not guaranteed to be stable.

    2. Change directory into it

      $ cd ITSPythonSDK
      
    3. Install the package by running any one of these below. You can pass in the -e flag to perform an editable install.

      $ python3 -m pip install .           # Core dependencies
      $ python3 -m pip install .[all]      # All dependencies
      $ python3 -m pip install .[lint]     # Core + linting dependencies
      $ python3 -m pip install .[test]     # Core + testing dependencies
      $ python3 -m pip install .[docs]     # Core + docs dependencies
      $ python3 -m pip install -e .        # Core dependencies, editable install
      
    4. Done 🎉

Environment Setup: Anaconda 🐍#

Prerequisites#

Note

If Anaconda is already installed, these can be skipped. Version > 4.11.0 is recommended.

To check the installed version:

$ conda --version
  1. Download the sh script file from the download page

    • Alternatively, get the latest link and run wget

    $ wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
    
  2. Install and follow the instructions on the guide page

    $ bash Anaconda3-2021.11-Linux-x86_64.sh
    
  3. Close and open your terminal window for the installation to take effect, or you can enter the command source ~/.bashrc

  4. You should see that your new terminal has the prefix (base)

Creating the environment#

  1. Create a conda environment and activate it

    $ conda create --yes --name akkits38 python=3.8
    $ conda activate akkits38
    

    Tip

    Modify --name <env_name> to use a different environment name.

  2. Continue with the installation steps

Note

You shouldn’t need sudo to run the commands. If you do, please make sure that your python3 and pip are from the Conda environment by running which python3 and which pip. The Conda environment should also be installed in your user directory.