Installation
Labelx (labelx
) requires Python 3.6, 3.7 or 3.8. If you do not already have a
Python environment configured on your computer, please see the
Python page for instructions on installing Python
environment.
Note
if you are on Windows and want to install optional packages (e.g., scipy) then you will need to install a python distribution such as Anaconda, Enthought Canopy or Pyzo. If you use one of these Python distributions, please refer to their online documentation.
Assuming that the default python environment is already configured on your computer and
you intend to install labelx
inside of it. To create and work with Python virtual
environments, please follow instructions on
venv and
virtual environments
To start the installation process, please make sure the latest version of pip
(python3 package manager) is installed. If pip
is not installed, please refer to
the Pip documentation and install
pip
first.
Linux/macOS
Install the latest release of labelx
with pip
:
pip install labelx
To upgrade to a newer version use the --upgrade
flag:
pip install --upgrade labelx
If system wide installation is not possible for permission reasons, use --user
flag to install labelx
for current user
pip install --user labelx
Windows
labelx
should support windows cmd
out of the box. But if you face any issues,
please refer to the hint
below -
Hint
Windows terminal (cmd/power shell) doesn’t support all the unicode codecs and To get the best results - please use a terminal emulator like, cmder [Download Cmder] or ConEmu [Download ConEmu]. Please use <xterm> color scheme from settings menu, for the best visual representation of the program.
Considering python3
is installed and pip
is configured.
Open Cmder/ConEmu and Type:
pip install labelx
Or
python3 setup.py install
This command should install labelx
with all the required dependencies.
Install from Github
Alternatively, labelx
can be installed manually by downloading the current version
from GitHub or
PyPI. To install a downloaded versions, please
unpack it in a preferred directory and run the following commands at the top level of
the directory:
pip install .
or run the following:
python3 setup install
Dependencies
This package requires a configuration file in either .yaml
or yml
format. The
look up priority for the configuration file is as following-
<user_home_directory>/.config/<package_name>/config.yaml (
Window/Linux/MacOS
)<current_working_directory>/<package_name>/config.yaml (
Windows/Linux/MacOS
)/etc/<package_name>/config.yaml (
Linux/MacOS
)
If config.yaml
doesn’t exists in one of these locations, the program will NOT run.
So, to create the configuration file, please use -
Windows
Windows system by default doesn’t allow creation of .
prefixed directory from GUI,
so use the following -
Open cmd and change the directory to the
home
folder of the userRun
mkdir .config
(if the folder doesn’t exist)Run
cd .config
Run
mkdir labelx
Now that the .
prefixed directory is created, use the GUI to add a file in
labelx
directory named config.yaml
. Once the file is created, open the file
and add the following lines according to your settings -
---
login:
host: <gitlab_server>
protocol: <https>/<http>
token: <secret_access_token_from_gitlab_profile>
Linux/MacOS
Open a terminal and
cd
into the home directory or any other directory form the above dependency list.Run
mkdir -p .config/labelx
Run
cd .config/labelx/
Run
nano config.yaml
Add the above lines into the file and save it