Skip to content

jlevy/prettyfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettyfmt

Installing Python, pipx, and Poetry

Sadly, there are many, many ways to install and set up your Python environment, each with its own pitfalls.

This is a quick cheat sheet for one of the simplest and most reliable ways to set up Python 3.11+ and Poetry 2.0+ (what you should use as of 2025) using pyenv and pipx.

For macOS:

brew update
brew install pyenv pipx

For Ubuntu:

curl https://pyenv.run | bash
apt install pipx

Now you can install a current Python and Poetry:

pyenv install 3.12.9  # Pick the version you want.
pipx install poetry

For Windows or other platforms, see the pyenv and poetry instructions (and I'd love a PR to help me update these instructions for Windows!).

Getting Code

  1. Fork this repo (having your own fork will make it easier to contribute).

  2. Check out the code.

  3. Install the package dependencies:

    poetry install

Development

Developer setup:

# To run a shell within the Python environment:
poetry shell
# Thereafter you can run tests.

# To run tests:
pytest   # all tests
pytest -s src/module/some_file.py  # one test, showing outputs

# Build wheel:
make build

# Linting and testing:
make lint
make test

# Poetry dependency management commands:
# Upgrade all dependencies:
poetry up
# Update poetry itself: 
poetry self update

About

A tiny library for more beautiful Python outputs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •