AI/Deep Learning/NLP, DevOps/Automation
Create a new Poetry project:
# poetry new <project-name> # Ex: poetry new rocketship
This creates a Poetry project with the following directory structure:
Activate the Python virtual environment:
cd ./rocketship poetry shell
Deactivate the Python virtual environment:
Install a Python package (
# poetry add <package_name> # Ex: poetry add requests
Uninstall a Python package (
# poetry remove <package_name> # Ex: poetry remove requests
Display the package information:
Lock the project dependencies:
Update the dependencies according to the
List the existing Python virtual environments associated with a Poetry project:
cd rocketship poetry env list
Delete the Python environment:
# poetry env remove <python-environment-name> # Ex: poetry env remove rocketship-DKQKySEf-py3.8
Follow this space (Vikas Z's blog) for more on Python Poetry usage and hacks.
Also published on Hashnode.
Create your free account to unlock your custom reading experience.