π₯οΈ 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 consoledocker 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