Installation#

Linux (Debian / Ubuntu)#

Depending on your preferences, you may install the dependencies either through APT or PIP. Please see the following steps if you want to use APT dependencies.

  • Install the APT dependencies:

sudo apt update
sudo apt install git ffmpeg python3 python3-opencv python3-numpy python3-poetry python3-pip python3-tqdm
  • If you are a developer, please also install the following dependencies:

sudo apt install python3-pip bumpversion python3-coverage python3-pytest python3-pytest-cov python3-pytest-runner python3-sphinx python3-sphinx-pydata-theme
sudo pip3 install sphinx_mdinclude --break-system-packages

Windows#

Package installation#

From pip#

pip3 install find-abstract-syntax-tree

From git#

  • Clone the repository and install the package:

git clone https://github.com/nokia/find-abstract-syntax-tree.git
cd find-abstract-syntax-tree
  • Install the missing dependencies and build the wheel of the project:

poetry install  # Install the core dependencies. Pass --with docs,test,dev to get the whole set of dependencies.
poetry build    # Build the wheel (see dist/*whl)
  • Install the wheel you just built, according to one of the following method, that affects the installation scope:

    • In poetry: this imposes to run your python-related commands through poetry run.

poetry run pip3 install dist/*whl
python3 -m venv env      # Create your virtual environment
source env/bin/activate  # Activate the "env" virtual environment
which python             # Should be your "env" python interpreter (not /usr/bin/python3)
pip install dist/*whl    # Install your wheel
deactivate               # Leave the  "env" virtual environment
  • System-wide (Linux):

sudo pip3 install dist/*whl --break-system-packages