Poetry cheatsheet#
Poetry |
Conda/PIP |
Description |
|---|---|---|
|
|
Initialise the package environment |
|
- |
Select which version of the python to use. |
|
|
Activate the virtual environment |
|
|
Deactivate the virtual environment |
|
|
Install the package, where |
|
- |
Install the package only for developing |
|
|
Uninstall the package |
|
|
Uninstall the package only for developing |
(file) |
(file) |
The requirement of the package list |
(file) |
(file) |
Python project configuration |
|
- |
Update the configuration file |
|
- |
Install the project dependencies |
|
- |
List the packages available to update |
|
|
Show the python packages (and dependencies). |
|
- |
Run jupyter notebook server at background. Using server-kernel in VScode’s jupyter notebook to get the python kernel. Use |
|
|
Export the lock file to alternative formats. |
|
- |
Build the packages needed. |
|
- |
Publish the packages to PyPI so that people can simply install pacakge by |
Trouble shooting#
If the
poetry add [package-name]stucks in'SecretService Keyring', set variable$PYTHON_KEYRING_BACKENDin your linux environment.export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring