From shlomo.solomon at gmail.com Thu Jul 8 17:11:02 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 8 Jul 2021 17:11:02 +0300 Subject: strange problem with digits in Libreoffice Message-ID: <20210708171102.4b7b2e7e@shlomo1.solomon> I have a problem in Libreoffice. If I type 123, that's what I see in the document. But if I type: ???? 123 I see: ???? 3 2 1 - extra spaces between the digits. This only happens in Hebrew, so hello 123 is OK. But there are no "real" spaces since I cannot delete them. Even stranger - If I export to a PDF, there are no digits!! I have 2 Kubuntu machines running the same version of Libreoffice (6.4.7.2). As far as I know both are configured the same, but I assume that there is some subtle difference that I'm missing since this problem occurs on only one of them. BTW - this only started recently, but I don't know exactly when (It's my wife's computer and she didn't notice it). -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From d.s at daniel.shahaf.name Fri Jul 9 19:46:02 2021 From: d.s at daniel.shahaf.name (Daniel Shahaf) Date: Fri, 09 Jul 2021 16:46:02 +0000 Subject: strange problem with digits in Libreoffice In-Reply-To: <20210708171102.4b7b2e7e@shlomo1.solomon> References: <20210708171102.4b7b2e7e@shlomo1.solomon> Message-ID: <1015387c-8058-4ded-98d2-8b2a539c5fc7@www.fastmail.com> Perhaps it's a font issue? Screenshot the "???? 3 2 1" on both computers and check whether the digits are from the same font? Try pdftotext on the PDF and see it emits digits? Diff the list of installed packages (`dpkg -l`) on the two machines? Try running libreoffice under a new user to rule out ~/.* configuration? A difference in /etc or debconf choices seems unlikely. Hope this helps ? even if it's just a bunch of shots in the dark? Cheers, Daniel Shlomo Solomon wrote on Thu, 08 Jul 2021 14:11 +00:00: > I have a problem in Libreoffice. > > If I type 123, that's what I see in the document. > > But if I type: ???? 123 > I see: ???? 3 2 1 - extra spaces between the digits. > > This only happens in Hebrew, so hello 123 is OK. > > But there are no "real" spaces since I cannot delete them. > > Even stranger - If I export to a PDF, there are no digits!! > > > I have 2 Kubuntu machines running the same version of Libreoffice > (6.4.7.2). As far as I know both are configured the same, but I assume > that there is some subtle difference that I'm missing since this problem > occurs on only one of them. > > BTW - this only started recently, but I don't know exactly when (It's > my wife's computer and she didn't notice it). > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > From shlomo.solomon at gmail.com Thu Jul 22 19:04:47 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 22 Jul 2021 19:04:47 +0300 Subject: multiple python versions Message-ID: <20210722190447.4e99f2fa@shlomo1.solomon> The default Kubuntu installation is 3.8.10 and I do not want to uninstall it since that could potentially "break" something. But for various reasons (not relevant to this discussion), I also have 3.9.6 installed. I can run either one of them, but in some cases, imports of modules that work in 3.8.10 don't work in 3.9.6. >>> import scapy Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'scapy' Although I don't want to re-install all modules, I "experimented" and got: sudo pip3 install scapy Requirement already satisfied: scapy in /usr/local/lib/python3.8/dist-packages (2.4.4) So even if I was willing to re-install everything, it would not work since the modules are already installed, but 3.9.6 does not "look" for them in the 3.8 directory. I know I can use venv to set up virtual environments for different versions, but although I haven't tried it, I don't see how that would solve the problem. Any ideas would be appreciated. -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From dyasny at gmail.com Thu Jul 22 19:09:15 2021 From: dyasny at gmail.com (Dan Yasny) Date: Thu, 22 Jul 2021 12:09:15 -0400 Subject: multiple python versions In-Reply-To: <20210722190447.4e99f2fa@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> Message-ID: How about using virtualenv for alternative versions? On Thu, Jul 22, 2021 at 12:05 PM Shlomo Solomon wrote: > The default Kubuntu installation is 3.8.10 and I do not want to > uninstall it since that could potentially "break" something. > > But for various reasons (not relevant to this discussion), I also have > 3.9.6 installed. > > I can run either one of them, but in some cases, imports of modules > that work in 3.8.10 don't work in 3.9.6. > >>> import scapy > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'scapy' > > Although I don't want to re-install all modules, I "experimented" and > got: > > sudo pip3 install scapy > Requirement already satisfied: scapy in > /usr/local/lib/python3.8/dist-packages (2.4.4) > > So even if I was willing to re-install everything, it would not work > since the modules are already installed, but 3.9.6 does not "look" for > them in the 3.8 directory. > > I know I can use venv to set up virtual environments for different > versions, but although I haven't tried it, I don't see how that would > solve the problem. > > Any ideas would be appreciated. > > > > > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w1 at zak.co.il Thu Jul 22 19:17:16 2021 From: w1 at zak.co.il (Omer Zak) Date: Thu, 22 Jul 2021 19:17:16 +0300 Subject: multiple python versions In-Reply-To: References: <20210722190447.4e99f2fa@shlomo1.solomon> Message-ID: <38330b15ec2307b7082ef4bd734a4910248937c6.camel@zak.co.il> 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. For more information: https://github.com/pyenv/pyenv https://ostechnix.com/pyenv-python-version-management-made-easier/ On Thu, 2021-07-22 at 12:09 -0400, Dan Yasny wrote: > How about using virtualenv for alternative versions? > > On Thu, Jul 22, 2021 at 12:05 PM Shlomo Solomon < > shlomo.solomon at gmail.com> wrote: > > The default Kubuntu installation is 3.8.10 and I do not want to > > uninstall it since that could potentially "break" something. > > > > But for various reasons (not relevant to this discussion), I also > > have > > 3.9.6 installed. > > > > I can run either one of them, but in some cases, imports of modules > > that work in 3.8.10 don't work in 3.9.6. > > >>> import scapy > > Traceback (most recent call last): > > File "", line 1, in > > ModuleNotFoundError: No module named 'scapy' > > > > Although I don't want to re-install all modules, I "experimented" > > and > > got: > > > > sudo pip3 install scapy > > Requirement already satisfied: scapy in > > /usr/local/lib/python3.8/dist-packages (2.4.4) > > > > So even if I was willing to re-install everything, it would not > > work > > since the modules are already installed, but 3.9.6 does not "look" > > for > > them in the 3.8 directory. > > > > I know I can use venv to set up virtual environments for different > > versions, but although I haven't tried it, I don't see how that > > would > > solve the problem. > > -- QA People of Curse. 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 From shlomo.solomon at gmail.com Thu Jul 22 19:37:46 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 22 Jul 2021 19:37:46 +0300 Subject: multiple python versions In-Reply-To: References: <20210722190447.4e99f2fa@shlomo1.solomon> Message-ID: <20210722193746.312d4525@shlomo1.solomon> Omer Zak 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 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. -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From dyasny at gmail.com Thu Jul 22 19:41:41 2021 From: dyasny at gmail.com (Dan Yasny) Date: Thu, 22 Jul 2021 12:41:41 -0400 Subject: multiple python versions In-Reply-To: <20210722193746.312d4525@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> Message-ID: why reinstall? Keep your versions venvs in place and hop in/out On Thu, Jul 22, 2021 at 12:37 PM Shlomo Solomon wrote: > Omer Zak 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 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. > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w1 at zak.co.il Thu Jul 22 19:50:46 2021 From: w1 at zak.co.il (Omer Zak) Date: Thu, 22 Jul 2021 19:50:46 +0300 Subject: multiple python versions In-Reply-To: <20210722193746.312d4525@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> Message-ID: <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> Why do you want to avoid having to re-install modules for each version/environment? 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 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 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. -- There is no IGLU Cabal. The Cabal that can be spoken of is not the true Cabal. 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 From shlomo.solomon at gmail.com Thu Jul 22 19:51:12 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 22 Jul 2021 19:51:12 +0300 Subject: multiple python versions In-Reply-To: References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> Message-ID: <20210722195112.30e68529@shlomo1.solomon> I guess I don't completely understand the concept after all. If I setup a virtual environment for 3.9.6, how would it "know" that modules are installed in the 3.8 directory? As I wrote in my original post, without a virtual environment, in 3.9.6 I get: >>> import scapy Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'scapy' but the module does exist in 3.8: sudo pip3 install scapy Requirement already satisfied: scapy in /usr/local/lib/python3.8/dist-packages (2.4.4) So how do I tell the 3.9.6 environment to look for modules in the 3.8 directory? On Thu, 22 Jul 2021 12:41:41 -0400 Dan Yasny wrote: > why reinstall? Keep your versions venvs in place and hop in/out > > > On Thu, Jul 22, 2021 at 12:37 PM Shlomo Solomon > wrote: > > > Omer Zak 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 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. > > > > > > -- > > Shlomo Solomon > > http://the-solomons.net > > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > > -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From shlomo.solomon at gmail.com Thu Jul 22 20:02:36 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 22 Jul 2021 20:02:36 +0300 Subject: multiple python versions In-Reply-To: <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> Message-ID: <20210722200236.4f265717@shlomo1.solomon> On Thu, 22 Jul 2021 19:50:46 +0300 Omer Zak 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 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 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. -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From w1 at zak.co.il Thu Jul 22 20:03:14 2021 From: w1 at zak.co.il (Omer Zak) Date: Thu, 22 Jul 2021 20:03:14 +0300 Subject: multiple python versions In-Reply-To: <20210722195112.30e68529@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <20210722195112.30e68529@shlomo1.solomon> Message-ID: You do not tell the 3.9.6 environment to reuse 3.8 directory modules. The compiled code in 3.8 may be incompatible with your 3.9.6 interpreter. Use pyenv and then use 'pip install' (under venv, it automatically knows to use pip3 if you use any 3.x version). Do not use 'sudo' because you are installing the module only for that virtualenv, not for the entire system. On Thu, 2021-07-22 at 19:51 +0300, Shlomo Solomon wrote: > I guess I don't completely understand the concept after all. If I > setup > a virtual environment for 3.9.6, how would it "know" that modules are > installed in the 3.8 directory? As I wrote in my original post, > without > a virtual environment, in 3.9.6 I get: > > > > > import scapy > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'scapy' > > but the module does exist in 3.8: > > sudo pip3 install scapy > Requirement already satisfied: scapy in > /usr/local/lib/python3.8/dist-packages (2.4.4) > > > So how do I tell the 3.9.6 environment to look for modules in the 3.8 > directory? -- $ python >>> type(type(type)) 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 From dyasny at gmail.com Thu Jul 22 20:05:38 2021 From: dyasny at gmail.com (Dan Yasny) Date: Thu, 22 Jul 2021 13:05:38 -0400 Subject: multiple python versions In-Reply-To: <20210722195112.30e68529@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <20210722195112.30e68529@shlomo1.solomon> Message-ID: On Thu, Jul 22, 2021 at 12:51 PM Shlomo Solomon wrote: > I guess I don't completely understand the concept after all. If I setup > a virtual environment for 3.9.6, how would it "know" that modules are > installed in the 3.8 directory? As I wrote in my original post, without > a virtual environment, in 3.9.6 I get: > > >>> import scapy > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'scapy' > > but the module does exist in 3.8: > > sudo pip3 install scapy > Requirement already satisfied: scapy in > /usr/local/lib/python3.8/dist-packages (2.4.4) > > > So how do I tell the 3.9.6 environment to look for modules in the 3.8 > directory? > You don't, that's the whole point of venv - you have a separate set of modules in each environment, specific to it's version. There's the site-packages argument of course, but it's far from being best-practice. > > > > > > > On Thu, 22 Jul 2021 12:41:41 -0400 > Dan Yasny wrote: > > > why reinstall? Keep your versions venvs in place and hop in/out > > > > > > On Thu, Jul 22, 2021 at 12:37 PM Shlomo Solomon > > wrote: > > > > > Omer Zak 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 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. > > > > > > > > > -- > > > Shlomo Solomon > > > http://the-solomons.net > > > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > > > > > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w1 at zak.co.il Thu Jul 22 20:07:20 2021 From: w1 at zak.co.il (Omer Zak) Date: Thu, 22 Jul 2021 20:07:20 +0300 Subject: multiple python versions In-Reply-To: <20210722200236.4f265717@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> <20210722200236.4f265717@shlomo1.solomon> Message-ID: 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 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 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 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 From shlomo.solomon at gmail.com Thu Jul 22 20:30:31 2021 From: shlomo.solomon at gmail.com (Shlomo Solomon) Date: Thu, 22 Jul 2021 20:30:31 +0300 Subject: multiple python versions In-Reply-To: References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> <20210722200236.4f265717@shlomo1.solomon> Message-ID: <20210722203031.00f397fb@shlomo1.solomon> OK - to sum up: 1 - thanks to Omer and Dan 2 - it seems that I did understand the concept of virtual environments - as I wrote in my original post: > I know I can use venv to set up virtual environments for different > versions, but although I haven't tried it, I don't see how that would > solve the problem. 3 - based on the answers you both wrote, there's no solution to the "problem" of having to re-install modules. 4 - and it's probably not a good idea to try :-) 5 - based on all of the above, I'll probably pass on the idea of using 2 versions and wait for Kubuntu to move to 3.9, which will probably not be too far in the future. Again - thanks On Thu, 22 Jul 2021 20:07:20 +0300 Omer Zak wrote: > 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 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 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 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. > > > > -- Shlomo Solomon http://the-solomons.net Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 From yochai at titat.info Fri Jul 23 00:13:06 2021 From: yochai at titat.info (yochai) Date: Fri, 23 Jul 2021 00:13:06 +0300 Subject: multiple python versions In-Reply-To: References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <20210722195112.30e68529@shlomo1.solomon> Message-ID: <3310f80a-2101-f86e-5941-bfe3610c202f@titat.info> An HTML attachment was scrubbed... URL: From uri at speedy.net Fri Jul 23 05:53:35 2021 From: uri at speedy.net (=?UTF-8?B?15DXldeo15k=?=) Date: Fri, 23 Jul 2021 05:53:35 +0300 Subject: Python and Ubuntu versions Message-ID: Hi, I have a production server with Ubuntu 18.04 LTS (currently upgraded to Ubuntu 18.04.5 LTS) and I use Python in virtualenv - currently Python 3.6.9. I'm using Django and I read that from Django 4.0, a minimal version of Python 3.8 will be required. I would like to know how I use the latest version of Python (3.10 or 3.9) with my production server - do I have to reinstall a new server with the latest Ubuntu LTS version? Or do I have to upgrade my current server's Ubuntu version by upgrading the same machine? Or should I keep the Ubuntu version and only upgrade Python? I'm also using other software such as PostgreSQL which is currently psql (PostgreSQL) 10.17 (Ubuntu 10.17-0ubuntu0.18.04.1). Should I upgrade this too? And what is the risk that things will not work after I upgrade this? Thanks, ???? uri at speedy.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabin at rabin.io Fri Jul 23 11:35:47 2021 From: rabin at rabin.io (Rabin Yasharzadehe) Date: Fri, 23 Jul 2021 11:35:47 +0300 Subject: Python and Ubuntu versions In-Reply-To: References: Message-ID: Many tools in the os are based on Perl or Python, so I won't recommend changing the base version which comes with the OS. Go with containers (e.g docker), and decuple the code from the os. -- Rabin ?On Fri, 23 Jul 2021 at 05:53, ??????? wrote:? > Hi, > > I have a production server with Ubuntu 18.04 LTS (currently upgraded > to Ubuntu 18.04.5 LTS) and I use Python in virtualenv - currently Python > 3.6.9. I'm using Django and I read that from Django 4.0, a minimal version > of Python 3.8 will be required. I would like to know how I use the latest > version of Python (3.10 or 3.9) with my production server - do I have to > reinstall a new server with the latest Ubuntu LTS version? Or do I have to > upgrade my current server's Ubuntu version by upgrading the same machine? > Or should I keep the Ubuntu version and only upgrade Python? I'm also using > other software such as PostgreSQL which is currently psql (PostgreSQL) > 10.17 (Ubuntu 10.17-0ubuntu0.18.04.1). Should I upgrade this too? And what > is the risk that things will not work after I upgrade this? > > Thanks, > ???? > uri at speedy.net > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramik7 at gmail.com Fri Jul 23 16:29:38 2021 From: ramik7 at gmail.com (Rami Krankurs) Date: Fri, 23 Jul 2021 16:29:38 +0300 Subject: Python and Ubuntu versions In-Reply-To: References: Message-ID: You can download it's source compile and install wherever you want in your system. Then refer your django to it. On Fri, Jul 23, 2021, 05:53 ???? wrote: > Hi, > > I have a production server with Ubuntu 18.04 LTS (currently upgraded > to Ubuntu 18.04.5 LTS) and I use Python in virtualenv - currently Python > 3.6.9. I'm using Django and I read that from Django 4.0, a minimal version > of Python 3.8 will be required. I would like to know how I use the latest > version of Python (3.10 or 3.9) with my production server - do I have to > reinstall a new server with the latest Ubuntu LTS version? Or do I have to > upgrade my current server's Ubuntu version by upgrading the same machine? > Or should I keep the Ubuntu version and only upgrade Python? I'm also using > other software such as PostgreSQL which is currently psql (PostgreSQL) > 10.17 (Ubuntu 10.17-0ubuntu0.18.04.1). Should I upgrade this too? And what > is the risk that things will not work after I upgrade this? > > Thanks, > ???? > uri at speedy.net > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From uri at speedy.net Mon Jul 26 04:56:16 2021 From: uri at speedy.net (=?UTF-8?B?15DXldeo15k=?=) Date: Mon, 26 Jul 2021 04:56:16 +0300 Subject: Python and Ubuntu versions In-Reply-To: References: Message-ID: Thank you. ???? uri at speedy.net On Fri, Jul 23, 2021 at 4:29 PM Rami Krankurs wrote: > You can download it's source compile and install wherever you want in your > system. > Then refer your django to it. > > On Fri, Jul 23, 2021, 05:53 ???? wrote: > >> Hi, >> >> I have a production server with Ubuntu 18.04 LTS (currently upgraded >> to Ubuntu 18.04.5 LTS) and I use Python in virtualenv - currently Python >> 3.6.9. I'm using Django and I read that from Django 4.0, a minimal version >> of Python 3.8 will be required. I would like to know how I use the latest >> version of Python (3.10 or 3.9) with my production server - do I have to >> reinstall a new server with the latest Ubuntu LTS version? Or do I have to >> upgrade my current server's Ubuntu version by upgrading the same machine? >> Or should I keep the Ubuntu version and only upgrade Python? I'm also using >> other software such as PostgreSQL which is currently psql (PostgreSQL) >> 10.17 (Ubuntu 10.17-0ubuntu0.18.04.1). Should I upgrade this too? And what >> is the risk that things will not work after I upgrade this? >> >> Thanks, >> ???? >> uri at speedy.net >> _______________________________________________ >> Linux-il mailing list >> Linux-il at cs.huji.ac.il >> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux-il at didi.bardavid.org Mon Jul 26 10:47:09 2021 From: linux-il at didi.bardavid.org (Yedidyah Bar David) Date: Mon, 26 Jul 2021 10:47:09 +0300 Subject: multiple python versions In-Reply-To: <20210722203031.00f397fb@shlomo1.solomon> References: <20210722190447.4e99f2fa@shlomo1.solomon> <20210722193746.312d4525@shlomo1.solomon> <70b6e49e17388ea0f204639fbc87aa7667385aae.camel@zak.co.il> <20210722200236.4f265717@shlomo1.solomon> <20210722203031.00f397fb@shlomo1.solomon> Message-ID: On Thu, Jul 22, 2021 at 8:31 PM Shlomo Solomon wrote: > > OK - to sum up: > 1 - thanks to Omer and Dan > 2 - it seems that I did understand the concept of virtual environments > - as I wrote in my original post: > > I know I can use venv to set up virtual environments for different > > versions, but although I haven't tried it, I don't see how that would > > solve the problem. > 3 - based on the answers you both wrote, there's no solution to the > "problem" of having to re-install modules. > 4 - and it's probably not a good idea to try :-) That's the main point, not that there is no solution. If you want to try to enforce use of modules from the other version, you can use PYTHONPATH and/or sys.path, or even play with importlib. But it remains a bad idea, unless you have very specific needs - not a mere "trying to save time". Best regards, > 5 - based on all of the above, I'll probably pass on the idea of using > 2 versions and wait for Kubuntu to move to 3.9, which will probably not > be too far in the future. > > Again - thanks > > > > On Thu, 22 Jul 2021 20:07:20 +0300 > Omer Zak wrote: > > > 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 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 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 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. > > > > > > > > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04 > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il