Python Package for macOS/Linux/Windows
Generate SSH Key
ANLT Utility requires an SSH key pair to run as a SSH service. To generate a SSH key pair, please open Command Prompt/PowerShell (Windows) or Terminal (macOS/Linux)
> ssh-keygen -t rsa
You will be prompted to save and name the key.
> Generating public/private rsa key pair. Enter file in which to save the key (/Users/USER/.ssh/id_rsa):
Press Enter to use the default name id_rsa
.
Important
The filename of the key should be id_rsa
. Please don’t use other filenames otherwise the application won’t be able to run.
Next you will be asked to create and confirm a passphrase for the key:
> Enter passphrase (empty for no passphrase):
Press Enter to skip passphrase.
> Enter same passphrase again:
Press Enter again to confirm passphrase.
This will generate two files, by default called id_rsa
and id_rsa.pub
in /Users/USER/.ssh
See also
You can read more about Generating SSH Key
Python Package for Win/macOS/Linux
Note
Skip this section, if you are a Windows (x64) user and don’t want to install ANLT Utility as a Python package but simply want the .exe application,
ANLT Utility is available to install via the Python Package Index. You can also install from the source file. The steps below will guide you through
Prerequisites
Before installing ANLT Utility, please make sure your environment has installed:
Install Python (requires Python >= 3.8)
Install Python
Important
ANLT Utility requires Python >= 3.8.
ANLT Utility requires that you download and install Python3 on your system.
Note
If you use Windows, remember to check Add python.exe to PATH.
After installation, open Command Prompt (Windows) or Terminal (macOS/Linux) and type python
to verify your Python installation.
> python
Python 3.10.10 (tags/v3.10.10:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ python3
Python 3.10.10 (v3.10.10:a58ebcc701, Feb 7 2023, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Note
🧐 If you are stuck with Python installation, seek help in Python 3 Installation & Setup Guide
Install PIP
Make sure pip
is installed on your system. pip
is the package installer for Python . You can use it to install packages from the Python Package Index and other indexes.
Usually, pip
is automatically installed if you are:
working in a virtual Python environment (virtualenv or venv ). It is not necessary to use
sudo pip
inside a virtual Python environment.using Python downloaded from python.org
If you don’t have pip
installed, you can:
Download the script, from https://bootstrap.pypa.io/get-pip.py.
Open a terminal/command prompt,
cd
to the folder containing theget-pip.py
file and run:
> py get-pip.py
$ python3 get-pip.py
See also
Read more details about this script in pypa/get-pip.
Read more about installation of pip
in pip installation.
Install From PyPi Repository
pip
is the recommended installer for ANLT Utility. The most common usage of pip
is to install from the Python Package Index using Requirement Specifiers.
Note
If you install ANLT Utility using pip install xoa-utils
, XOA Python API (PyPI package name xoa_driver) will be automatically installed.
Important
You can either install xoa-utils in your global Python namespace/package inventory or you can create a virtual Python environment to prevent polluting your global Python package inventory
If Install To Global Namespace
> pip install xoa-utils # latest version
> pip install xoa-utils==1.0.0 # specific version
> pip install xoa-utils>=1.0.0 # minimum version
$ pip install xoa-utils # latest version
$ pip install xoa-utils==1.0.0 # specific version
$ pip install xoa-utils>=1.0.0 # minimum version
If Install To Virtual Environment
Install ANLT Utility in a virtual environment, so it does not pollute your global namespace.
For example, your project folder is called /my_xoa_project
.
[my_xoa_project]> python -m venv .\env
[my_xoa_project]> .env\Scripts\activate
(env) [my_xoa_project]> pip install xoa-utils # latest version
(env) [my_xoa_project]> pip install xoa-utils==1.0.0 # specific version
(env) [my_xoa_project]> pip install xoa-utils>=1.0.0 # minimum version
[my_xoa_project]$ python3 -m venv ./env
[my_xoa_project]$ source ./env/bin/activate
(env) [my_xoa_project]$ pip install xoa-utils # latest version
(env) [my_xoa_project]$ pip install xoa-utils==1.0.0 # specific version
(env) [my_xoa_project]$ pip install xoa-utile>=1.0.0 # minimum version
Afterwards, your project folder will be:
/my_xoa_project
|
|- env
See also
Upgrade From PyPi Repository
To upgrade ANLT Utility package from PyPI:
> pip install xoa-utils --upgrade
$ pip install xoa-utils --upgrade
Note
If you upgrade ANLT Utility using pip install --upgrade xoa-utils
, XOA Python API (PyPI package name xoa_driver) will be automatically upgraded.
Install Manually From Source
If you don’t have internet access, you can install ANLT Utility manually from source, the steps are:
Step 1, make sure Python packages wheel and setuptools are installed on your system. Install wheel
and setuptools
using pip
:
> pip install wheel setuptools
$ pip install wheel setuptools
Step 2, download the ANLT Utility source distribution from ANLT Utility Releases. Unzip the archive and run the setup.py
script to install the package:
[xoa_core]> python setup.py install
[xoa_core]$ python3 setup.py install
Step 3, if you want to distribute, you can build .whl
file for distribution from the source:
[xoa_core]> python setup.py bdist_wheel
[xoa_core]$ python3 setup.py bdist_wheel
Important
If you install ANLT Utility from the source code, you need to install XOA Python API (PyPI package name xoa_driver) separately. This is because XOA Python API is treated as a 3rd-party dependency of ANLT Utility. You can go to XOA Python API repository to learn how to install it.
Start ANLT Utility
After installing the package and ensuring the SSH key in place, you can start ANLT Utility simply by typing xoa-utils
> xoa-utils
(PID: 12345) ANLT Utility SSH Service (1.1.0) running on 0.0.0.0:22622.
$ xoa-utils
(PID: 12345) ANLT Utility SSH Service (1.1.0) running on 0.0.0.0:22622.
Note
If you want to run xoa-utils SSH service on a different port, do xoa-utils <port number>
Uninstall and Remove Unused Dependencies
pip uninstall xoa-utils
can uninstall the package itself but not its dependencies. Leaving the package’s dependencies in your environment can later create conflicting dependencies problem.
We recommend install and use the pip-autoremove utility to remove a package plus unused dependencies.
> pip install pip-autoremove
> pip-autoremove xoa-utils -y
$ pip install pip-autoremove
$ pip-autoremove xoa-utils -y