Python šŸ

I don’t have any issues with Python’s packaging ecosystem anymore, having settled comfortably into a pyenv+virtualenv+pip-tools as my ā€œstackā€ after going around the block a few times.

But even so, I must recognise how awful the experience is for new users. It’s taken me years to settle into this system, and it can take half a day to get someone up to speed with these tools if they haven’t used them. - HN / Interview with a Senior Python Developer

# Packaging Mess

caption

# UV ⮺

uv can use pyproject.toml files to describe package to install.

Should I Commit uv.lock or not?

  • Yes - in most cases you should commit uv.lock.
  • you might not commit it only if your are building libraries

see also UV is the best thing to happen to the Python ecosystem in a decade

  • How uv got so fast - The most surprising part of uv’s success to me isn’t Rust at all, it’s how much speed we ā€œunlockedā€ just by finally treating Python packaging as a well-specified systems problem instead of a pile of historical accidents.
    • That feels like cargo-culting the toolchain - Jokes aside, what you describe is a common pattern. It’s also why Google internally they used to get decent speedups from rewriting some old C++ project in Go for a while: the magic was mostly in the rewrite-with-hindsight.
  • You might be interested in pixi, which is roughly to conda as uv is to pip
    • Pixi is what FreeCAD is now using. (Along with Rattler). - It makes building FreeCAD pretty trivial, which is a huge deal considering FreeCAD’s really complex Python and non-python, cross-platform dependencies.

# Poetry

poetry gave us lock files and consistent installs for years. uv is much, much faster however.

# Pip / Conda

# PyEnv / VirtualEnv

The pyenv project was forked from rbenv and ruby-build, and modified for Python. - Is there a Python alternative to RVM or Rbenv?

pyenv - allows to work with different python version
virtualenv - for same python version, allows tu use different set of installed library. ex: virtualenv -p python3 py-opencv pyenv-virtualenv - is a plugin for pyenv by the same author as pyenv, to allow you to use pyenv and virtualenv at the same time conveniently.

# virtualenv

$ virtualenv -p python3 mytest  # create
$ source mytest/bin/activate    # activate in bash

For other shell like Fish use source mytest/bin/activate.fish instead

see also

# Conda - see HN comment

Don’t need sudo right to use it.

  • Installing on Linux - Anaconda vs. miniconda - Choose Anaconda if you are new to conda or Python - Choose Miniconda if you Just want fast access to Python and the conda commands, and wish to sort out the other programs later

# Fish shell support

Run ā€˜conda init fish’ and restart your shell.

Written on July 18, 2020, Last update on January 9, 2026
python lang fish