it has come to my attention that people still have problems with their python environment.
- install pyenv with
curl https://pyenv.run | bash
pyenv install 3.11
now you have the latest python (it can also install pypy, anaconda and many others if you need)pyenv global 3.11
now you have a global pythonpyenv virtualenv 3.11 ape
now you have a virtualenvpyenv local ape
now the project folder contains .python-version which automatically activates the environment when you enter the folder
read more about pyenv here https://github.com/pyenv/pyenv-installer
now it's time to develop your program. there are many advanced packaging tools (read about poetry or hatch to see if you need the advanced features), but we will go with the simplest one.
pip install flit
now you have a packaging toolflit init
now you have a pyproject.toml, which is a modern way to specify packagesflit install
now you have installed your project for developmentflit publish
now you have uploaded it to pypi for everyone to use
read more on flit here https://flit.pypa.io/en/stable/index.html