Learn how to manage virtual environments in Python to avoid dependency conflicts and ensure smooth project management.
| Command | Description | Example |
|-------------------------------------|-|-------------------------------------------|
| `python -m venv ` | Creates a virtual environment. | `python -m venv venv` |
| `source venv/bin/activate` | Activates the virtual environment. | `source venv/bin/activate` |
| `deactivate` | Deactivates the virtual environment. | `deactivate` |
| `pip install ` | Installs a library. | `pip install pandas` |
| `pip install ==` | Installs a specific version of a library. | `pip install pandas==2.1.4` |
| `pip show ` | Shows information about an installed library. | `pip show pandas` |
| `pip uninstall ` | Uninstalls a library. | `pip uninstall pandas` |
| `pip freeze` | Lists all installed libraries and their versions. | `pip freeze` |
| `pip freeze > requirements.txt` | Saves the list of installed libraries to a requirements.txt file. | `pip freeze > requirements.txt` |
| `pip install -r requirements.txt` | Installs all libraries listed in a requirements.txt file. | `pip install -r requirements.txt` |
Simon Willison introduces llm-smollm2, a plugin for LLM that includes a quantized version of the SmolLM2-135M-Instruct model. The article details how to install and use the model, discusses the process of finding, building, packaging, and publishing the plugin, and evaluates the model's capabilities.
uv is a drop-in replacement for common pip, pip-tools, and virtualenv commands, providing 10-100x faster installation and syncing compared to pip and pip-tools. It offers disk-space efficient global cache, advanced features, and best-in-class error messages. uv is backed by Astral, creators of Ruff.
On Linux and macOS you can find the user base binary directory by running python -m site --user-base and adding bin to the end. F