DEV Community

sc0v0ne
sc0v0ne

Posted on

4 2 2 2 2

How to control python package versions?

Guys, I have a question, how can you control the versions of Python packages for different Python versions in software development at work?

Example:

I have the following packages

VersionPython 3.8
A==1.1.2
B==2.3.1

I have software using these packages.

But I need to use this software for Python 3.10, but package A is not compatible with this version of Python 3.10, because it was updated to version A==2.3.1, it is causing incompatibility with version 3.8.

What would be the ways and tools to be able to test and verify the compatibility of versions, without having to affect the software's functionalities?

Top comments (7)

Collapse
 
guilourenzo profile image
Guilherme Lourenço

Maybe you're looking for Poetry ! It is excellent python package manager that helps you track that kind of thing.

Check the docs to see if it helps you...

Collapse
 
lovestaco profile image
Athreya aka Maneshwar

+1

Collapse
 
sc0v0ne profile image
sc0v0ne

Thanks!!! @guilourenzo

Collapse
 
imtimmeta profile image
imtimmeta

I wrote about this very thing! Poetry! dev.to/imtimmeta/how-to-control-pa...

Collapse
 
sc0v0ne profile image
sc0v0ne

Very thanks ! @imtimmeta

Collapse
 
anudeepchpaul profile image
Anudeep Chandra Paul • Edited

You can try this: github.com/pyenv/pyenv
Very easy to setup + easy to manage.

Check out the docs to see if it suits your needs.

Collapse
 
sc0v0ne profile image
sc0v0ne

Thanks!!! @anudeepchpaul

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more