Skip to content

← Return to the main README

πŸ–₯️ Developed with another tool or via console

Docker console

  • If Dockerfile has SHELL ["/bin/bash", "-c"] use /bin/bash to use history, command autocompletion, etc.
  • If your Dockerfile contains USER usrapp, use to connect to the Docker container console

    docker exec -it "containerName" /bin/bash
    
  • For installation use:

    docker exec -it --user=root "containerName" /bin/bash
    

🏒 Windows | 🐍 ⌨️ Creation of the virtual environment

🧰 Install Python on your operating system and locate the binary. πŸ”πŸ“ For this documentation, Python 3.11 has been downloaded and installed, and the binary is located in this path

    C:\python\python311\python.exe

(Powershell)🐍 Python Virtual environment

🧰 Open a console to run the following commands for the first time. πŸ”πŸ“ Navigate to the root of the samples directory and open a PowerShell console.

$python_bin="C:\python\python311\python.exe"
& $python_bin --version
& $python_bin -m pip install --upgrade pip
& $python_bin -m pip install virtualenv --upgrade
& $python_bin -m virtualenv venv
. venv/Scripts/activate
(venv) PS C:\tmp\> python --version
(venv) PS C:\tmp\> python -m pip install --upgrade pip
(venv) PS C:\tmp\> pip install -r .\requirements.txt

Execution of development commands

πŸ”πŸ“ Navigate to the root of the samples directory and open a PowerShell console.

(venv) PS C:\tmp\> python .\script_console.py

🐧Linux | πŸ‹ πŸ–§ Creation of the virtual environment

πŸ–₯️ πŸ–§ Creation of the virtual environment

πŸ” 🧰 Install Python on your operating system and locate the binary.

which python
    # /usr/bin/python
ls -l /usr/bin/python*
    # lrwxrwxrwx 1 root root       7 Jun 13  2023 /usr/bin/python -> python3
    # lrwxrwxrwx 1 root root      10 Nov 12 12:15 /usr/bin/python3 -> python3.12
    # -rwxr-xr-x 1 root root 5232024 Oct 10 08:52 /usr/bin/python3.10
    # -rwxr-xr-x 1 root root 6637240 Oct 10 08:54 /usr/bin/python3.11
    # -rwxr-xr-x 1 root root 8021824 Aug 14 17:47 /usr/bin/python3.12
    # -rwxr-xr-x 2 root root 4632232 Apr 27  2024 /usr/bin/python3.7
    # -rwxr-xr-x 2 root root 4632232 Apr 27  2024 /usr/bin/python3.7m
    # -rwxr-xr-x 1 root root 4933768 Sep  7  2024 /usr/bin/python3.8
    # -rwxr-xr-x 1 root root 5221200 Nov  7 18:07 /usr/bin/python3.9

🐍 Select the Python version and create the virtual environment

🧰 Open a console to run the following commands for the first time.

  • Create a virtual environment
python_bin="/usr/bin/python3.11"
$python_bin --version
$python_bin -m pip --version
$python_bin -m pip install --upgrade pip
$python_bin -m pip install virtualenv --upgrade
$python_bin -m virtualenv venv
. venv/bin/activate
(venv) $ python --version
(venv) $ python -m pip install --upgrade pip
(venv) $ pip install -r requirements.txt

Execution of development commands

πŸ”πŸ“ Navigate to the root of the samples directory and open a bash console.

(venv) $ python script_console.py

← Return to the main README