multiple python versions

multiple python versions

Omer Zak w1 at zak.co.il
Thu Jul 22 20:07:20 IDT 2021


FALSE ECONOMICS ALERT!
FALSE ECONOMICS ALERT!
FALSE ECONOMICS ALERT!

You say that "most modules DO work when moving to a newer version of
Python".
However when they do not work, it is a lot of work diagnosing the
problem and finding which module needs to have both versions installed
in parallel.

It is better to spend the (relatively short and predictable) time
maintaining a full virtualenv for each project. And if you are short on
disk space, then today's disks are big and inexpensive - much less
expensive than the time you spend trying to save few megabytes by not
installing parallel versions.




On Thu, 2021-07-22 at 20:02 +0300, Shlomo Solomon wrote:
> On Thu, 22 Jul 2021 19:50:46 +0300
> Omer Zak <w1 at zak.co.il> wrote:
> 
> > Why do you want to avoid having to re-install modules for each
> > version/environment?
> > 
> The short answer: too much work
> 
> The slightly longer answer: Although there are certainly changes
> between versions of Python and/or modules, most modules DO work when
> moving to a newer version of Python. I don't remember re-installing
> everything when upgrading to a newer version of Python.
> 
> But here, my problem is not upgrading, but keeping both versions.
> 
> 
> 
> 
> > In the general case, a module version is compatible only with a
> > subset
> > of Python versions, due to API changes from Python version to
> > Python
> > version.
> > 
> > You also want to let each project decide with which module version
> > it
> > wants to work, due to potential incompatibilities between module
> > versions (it is no accident that pip freeze preserves installed
> > module
> > versions).
> > 
> > 
> > On Thu, 2021-07-22 at 19:37 +0300, Shlomo Solomon wrote:
> > > Omer Zak <w1 at zak.co.il> wrote:
> > > > The answer to your prayers is pyenv.
> > > > It allows you to install multiple Python versions in parallel,
> > > > and
> > > > for
> > > > each version you can maintain several virtualenvs.
> > > 
> > > Dan Yasny <dyasny at gmail.com> wrote:
> > > > How about using virtualenv for alternative versions?
> > > 
> > > Yes, I know about pyenv and virtualenv, but wouldn't I have to
> > > re-install modules for each version/environment? That's what I'm
> > > trying
> > > to avoid.
> 
> 
-- 
"Prior to capitalism, the way people amassed great wealth was by
looting, plundering and enslaving their fellow man. Capitalism made it
possible to become wealthy by serving your fellow man." - Walter E.
Williams
My own blog is at https://tddpirate.zak.co.il/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with
which I may be affiliated in any way.
WARNING TO SPAMMERS:  at https://www.zak.co.il/spamwarning.html






More information about the Linux-il mailing list