Conda and Poetry are All You Need
Introduction
Poetry is being used more and more in Python project as a very convenient tool for managing dependencies. Since conda is a great tool for handling virtual environment, the combination between conda and poetry help Python projects well-organized and perfectly isolated.
Project Initialization Using conda and poetry
Install conda/miniconda
Create a new conda environment
conda create -n <name-of-env>
conda activate <name-of-env>
(name-of-env) conda install python=<python-version>Install poetry
(name-of-env) pip install poetryor using conda
(name-of-env) conda install poetryInitialize project
(name-of-env) mkdir <project-name>
(name-of-env) cd <project-name>
(name-of-env) poetry initNote: If you got this error ModuleNotFoundError: No module named 'chardet', you should install the charset library as below before reinitializing your project. This error may happen when installing poetry using conda.
conda install -c conda-forge charset-normalizerOther Tips with conda
- Install node in conda:
conda install -c conda-forge nodejs - Autocompletion in zsh: https://github.com/conda-incubator/conda-zsh-completion