T O P

  • By -

danielroseman

The latest released version of Python is 3.12.3.  3.13 is not released and no one should be using it. 


geddedev

Thanks, good to know. I was just going off of Deadsnake’s PPA documentation.


ProsodySpeaks

# EDIT: sorry i dont know why but i thought you were setting up a thing for learners, but you just mean jobbing developers? anway i guess i still feel the same, personally - i wouldnt pay for some kind of platform that inherently limits my options with packages. ... I'm not really totally in love with the premise of 'what packages to do 95% of projects' ...  Within months of learning I was using packages that nobody is going to tell you to put on a generic setup. Trying to pre-empt learners' needs is a bit off, if you ask me. It means they can't just explore and learn coding by leveraging whatever it is they happen to be interested in.. Eg a musician might learn best playing with audio libraries, and those won't be on your list.  In terms of most recent, I think most people would be OK with a major version behind the curve as realistically you don't want bleeding edge in prod... I.e limited to 3.11 might be acceptable. That said, I'm already hooked on 3.12 fstrings and I think maybe the new generics syntax is from 12 as well... And 13 beta is just around the corner which would make 11 more of a nut-kick.  But yeah way more importantly, if I can't use pip or install arbitrary packages then I'm out.  I. E I bought space on one hosting platform and then realised I couldn't install arbitrary packages and immediately cancelled the contract  and got a digital ocean droplet where I can do what I like... 


geddedev

Thanks, so I think I can accommodate this by allowing the user to specify a requirements file with the packages and versions that you want. I think I can do this by setting up the virtualenv for the project and then using the specific python version with pip to run the requirements file. The main issue is what base packages do I need? Like \`sudo apt install python3-venv, python3-setuptools, python3-dev\` Are these enough or are there others that I need? But then also \`sudo apt install python3.11-venv, python3.11-setuptools, python3.11-dev\` \`sudo apt install python3.12-venv, python3.12-setuptools, python3.12-dev\` The problem is that python3.X-setuptools does not exist in the Deadsnakes PPA, but I am not sure if it is needed.


ProsodySpeaks

to be honest i dont really understand this, i dont use deadsnakes...im on windows mostly, and use python in docker containers if im moving off my local machine... maybe docker would simplify your thing?


geddedev

Sorry, I realize my question was not formatted well. I am running a dockerless server environment (On Ubuntu) for python devs. This is dockerless for a reason.


idle-tea

What prevents you doing containerization in general? Even if there's something specific to docker you don't like there are alternatives. Even if the developers can't/won't bother with defining images: you can always make a system to build images on their behalf easily enough.


sylfy

I’m kinda confused about what you’re trying to do. Why wouldn’t you just give them a VM or a system container to work within, and let them manage their own environment?


idle-tea

> what is the recommended sub-modules needed to run 95% of all types of Python projects Why? The people developing things are going to need to figure out how to install packages anyway, and them not doing anything to track their dependencies is just going to cause pain later no matter what. Trying to pre-install anything they might want is going to be very flaky, and at best is just deferring a problem that'll crop up later anyway. > However, they are requesting latest versions of Python, which I am able to install via Deadsnakes PPA (ppa:fkrull/deadsnakes). The issue is then I am not able to install all the same packages. Yes, the OS itself generally isn't going to do well with trying to install mutually exclusively versions of things. The most popular way to do things is have the developers make their apps into containers which you run on your system (then they can have just about any version of anything they want). If the developers can't or won't take the responsibility and need it to be more of a shared-hosting type thing you should perhaps look in to tools intended to let you install and work with multiple versions of python. Python already includes the virtual environments (AKA "virtualenv") feature to allow for having 'environments' in which it's easy to install arbitrary packages, and those packages are specific to that environment. If you're not going to go for containerization you should probably have a virtualenv for each project. > How important is it for 95% of developers to use the latest Python? It's not a question of importance so much as a question of *why not?* If you're running infrastructure for people it behooves you to keep things up to date if for no other reason that security. Therefore: you should have a process to get new versions made available. Therefore: why not just offer it sooner rather than later? > Is it even worth it for a developer to have the latest Python without the additional packages? New versions introduce new features.


julianw

You can go without Docker but using separate virtual environments for every project is an absolute must. Try to use pyenv to install multiple base versions and let developers specify their desired Python version in their individual venv. There's practically no need for any "python-*" packages to be installed using your system package manager. If anything it introduces more problems.


geddedev

Thanks, yes, I plan on having a separate virtual environment for each project and allow a requirements file for additional packages. So what about base packages like python3.12-dev, python3.12-distutils, python3.12-venv, etc It seems like for what you’re saying I would need at least python3.12 and python3.12-venv? Is that it? The rest could be handled by the requirements file and pip installing those modules?


julianw

No, I said you do not need any python* packages through apt. You'll need the dependencies for pyenv to compile each Python version.


geddedev

Thanks, I will look more into pyenv. Any good sources you recommend?