The first step on working with Python project is the dependency management: Managing Python dependencies. In this way you can have a reproducible environment that can be be shared with other colleagues or used in automation tools.
| Table of Contents |
|---|
Using uv
| Code Block |
|---|
uv add <package-name> |
This does two things at once:
installs the package
updates your
pyproject.tomlanduv.lock(similar to Pipenv’s Pipfile/Pipfile.lock)
Using Pipenv
| Code Block |
|---|
pipenv install <package_name> |
you can add more package to the input commands to install more packages simultaneously. All packages will be recorded in the Pipfile/Pipfile.lock.
Using Conda
| Code Block |
|---|
conda install <package_name> |
Now that we have an environment with the required packages and Python version, we can move to prepare and run the actual code.