Installation Poetry on Distant lab
Complexity Explained
Poetry functions is a standalone tool that leverages the Python environment as its foundation. Consequently, Poetry must be installed on the base Python system. However, modifying the Python installation directly on shared systems, such as laboratory setups, is risky, as libraries can potentially be altered by other users. Therefore, the recommended approach is to create a dedicated virtual environment for Poetry’s installation.
To set up Poetry in a virtual environment, follow these steps:
1 |
|
Once Poetry is installed, deactivate the virtual environment: (this step is mandatory because otherwise you would overwrite poetry installation with some package)
1 |
|
At this point, Poetry is ready for use, enabling you to manage dependencies and installations as needed.
Poetry can have some issue with local package when updating. it is advised to run :
1 |
|
In order to regain control over poetry local
Note: It is important to distinguish between this dedicated virtual environment for Poetry and the typical project-specific virtual environments (e.g., .venv).