Re: Terminal Emulator (Posting On Python-List Prohibited)
On 5/19/2024 6:00 PM, Karsten Hilbert via Python-list wrote: Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip. You must use a venv to pip install packages from pypi now. Which makes one wonder how one is supposed to package Python applications requiring modules not yet packaged by Debian. I confess, I sometimes install those packages using pip's self-warning option "--break-system-packages". Naturally I only install them with --user. Another option besides venvs is to install a different version of Python from python.org, not by using the system installer. For example, if your system version is, say, 3.8.10 (as it is on my Mint VM), install 3.11.9 and make sure you always launch pip with python3.11 -m pip I have done this on some VMs, and use the system's Python on some others. Happily none of my Linux VMs are critical for anything. I can blow them away and recreate them without worry. -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 5/19/2024 6:34 PM, Grant Edwards via Python-list wrote: On 2024-05-19, Barry via Python-list wrote: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip. You can't even use pip to do "user" installs? Nope, often not. The error messages I've gotten do tell you to use the "--break-system-packages" flag if you really, really want to install the package. So python3 -m pip install --user --break-system-packages [--upgrade] Or install an additional version of Python that isn't managed by the system. Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 5/19/2024 6:08 PM, Skip Montanaro via Python-list wrote: Modern debian (ubuntu) and fedora block users installing using pip. Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I honestly haven't tried. Maybe I should... 樂 I have an old laptop running XUbuntu 22.04 which I generally only use to compile the most recent branches on GitHub (main, 3.12, & 3.13 at the moment). On some (maybe all) of my Linux VMs, pip - the one installed for the system - won't install something even with --user unless you use the --break-system-packages flag. -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19, Barry via Python-list wrote: > > >> On 18 May 2024, at 16:27, Peter J. Holzer via Python-list >> wrote: >> >> I don't think Linux users have to deal with venvs > > Modern debian (ubuntu) and fedora block users installing using pip. You can't even use pip to do "user" installs? -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19, Gilmeh Serda via Python-list wrote: > On Sun, 19 May 2024 08:32:46 +0100, Alan Gauld wrote: > >> I've honestly never experienced this "nightmare". >> I install stuff and it just works. > > Hear! Hear! Me too! And all that. > > I'm on Manjaro, which is a tad finicky about other people touching its > Python since it's used for lots of things. I install things for myself > only. > > Was there a reason they chose the name Pip? I always assumed it was in honor of the PIP (Peripheral Interchange Program?) utility that was used to copy files around on CP/M and DEC's PDP-11 OSes. -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08: Modern debian (ubuntu) and fedora block users installing using pip. > Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I assumed pip install --user would work, but no. I tried it (on Debian 12 (bookworm)): $ pip install --user docopt error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.11/README.venv for more information. note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. Exactly the same output for sudo pip install. For easy reference here's a link to that PEP 668: https://peps.python.org/pep-0668/ Which links to the "Externally Managed Environments" on the PyPA specs page: https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments -- "If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed." -― Onbekend (dikwijls toegeschreven aan Mark Twain, waarschijnlijk onterecht) -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
Modern debian (ubuntu) and fedora block users installing using pip. > Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I honestly haven't tried. Maybe I should... 樂 I have an old laptop running XUbuntu 22.04 which I generally only use to compile the most recent branches on GitHub (main, 3.12, & 3.13 at the moment). Skip -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list: > > On 18 May 2024, at 16:27, Peter J. Holzer via Python-list > > wrote: > > > > I don't think Linux users have to deal with venvs > > Modern debian (ubuntu) and fedora block users installing using pip. > You must use a venv to pip install packages from pypi now. Which makes one wonder how one is supposed to package Python applications requiring modules not yet packaged by Debian. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
> On 18 May 2024, at 16:27, Peter J. Holzer via Python-list > wrote: > > I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip. You must use a venv to pip install packages from pypi now. This is implemented in python and pip and enabled by the distros. There are ways to turn off the blocking, but it’s strongly discouraged by the distros. Barry -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19 at 18:13:23 +, Gilmeh Serda via Python-list wrote: > Was there a reason they chose the name Pip? Package Installer for Python https://pip.pypa.io/en/stable/index.html -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19 19:13, Gilmeh Serda via Python-list wrote: On Sun, 19 May 2024 08:32:46 +0100, Alan Gauld wrote: I've honestly never experienced this "nightmare". I install stuff and it just works. Hear! Hear! Me too! And all that. I'm on Manjaro, which is a tad finicky about other people touching its Python since it's used for lots of things. I install things for myself only. Was there a reason they chose the name Pip? [snip] From https://pip.pypa.io/en/stable/: "pip is the package installer for Python." It's an acronym. -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19 at 18:13:23 +, Gilmeh Serda via Python-list wrote: > Was there a reason they chose the name Pip? Package Installer for Python https://pip.pypa.io/en/stable/index.html Every time I see PIP, I think Peripheral Interchange Program, but I'm old. -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 5/19/2024 3:32 AM, Alan Gauld via Python-list wrote: On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: [snip] The dependency nightmare created by python, pip and all the rest cannot be resolved otherwise. I've honestly never experienced this "nightmare". I install stuff and it just works. One way it can bite even you is if you have a program installed whose requirements claim it needs a certain library of version no higher than X, and you already already have a later version of that library installed since one of your other programs requires it. Pip won't install the new program because of this conflict. In reality, you may know the the new program would work fine with the version of the library you installed, but the packagers of the new program didn't realize they should have updated their requirements. With venvs, you can have separate environments for each. Of course this doesn't help if you need both packages in the same environment... -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 2024-05-19, Alan Gauld via Python-list wrote: >> The dependency nightmare created by python, pip >> and all the rest cannot be resolved otherwise. > > I've honestly never experienced this "nightmare". > I install stuff and it just works. Same here. I occasonlly use pip to install something that isn't packaged for Gentoo, but it doesn't seem to cause problems — let alone nightmares. I also occasionally package something myself. -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: venvs vs. package management
On 19/05/2024 08.49, Peter J. Holzer wrote: [...] That's what package management on Linux is for. Sure, it means that you won't have the newest version of anything and some packages not at all, but you don't have to care about dependencies. Or updates. Well, that doesn't work as well. Distributions do not pack everything, this also depending on licenses. Sometimes, or often, you need to use the *latest* version of something, due to some bugfix or similar. The distribution does not always keep up to date everything, so you're stuck. The only solution is a venv, with all needed packages for the given task. Typical problem with PyTorch / TensorFlow. In case of trouble, the first answer is: "Check with the latest (nightly) release". Which means installing something *outside* the Linux distribution support. And this impossible, because this will pull in dependencies like crazy, which are not (yet) in the Linux distribution path. Saying it differently, the latest greatest update is not a wish, it's a must... So, long story short, the only solution I know are venvs... Of course, other solutions are welcome! bye, -- piergiorgio -- https://mail.python.org/mailman/listinfo/python-list
Re: Terminal Emulator (Posting On Python-List Prohibited)
On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: >> So venvs make managing all that pretty convenient. Dunno why everybody's >> so down on venvs... Not so much down on them, they are just one extra step that's mostly not needed(in my use case) > Only people which are *not* using python... :-) > > In my experience, venvs is the only possible > way to use python properly. Well, I've been using Python since 1998 on Linux, Windows and MacOS and have yet to find a use for a venv. I've played with them when they first came out but haven't actually found a scenario where I've thought "I need a venv for that!" But then I'm a sole user, I have 3 or 4 projects going but only me working on them. I only have 2 Python versions at any time and the OS handles that just fine without any venvs. > The dependency nightmare created by python, pip > and all the rest cannot be resolved otherwise. I've honestly never experienced this "nightmare". I install stuff and it just works. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
venvs vs. package management (was: Terminal Emulator (Posting On Python-List Prohibited))
On 2024-05-18 20:12:33 +0200, Piergiorgio Sartor via Python-list wrote: > On 18/05/2024 20.04, Mats Wichmann wrote: > > So venvs make managing all that pretty convenient. Dunno why everybody's > > so down on venvs... > > Only people which are *not* using python... :-) > > In my experience, venvs is the only possible > way to use python properly. That's very much depends on what you mean by properly. Personally, I use venvs a lot. But most of the reasons have more to do with team culture than technical constraints. In a different situation (e.g. if all our developers used Linux and preferrably the same version) I could see myself using venvs much less or maybe not at all. > The dependency nightmare created by python, pip and all the rest > cannot be resolved otherwise. That's what package management on Linux is for. Sure, it means that you won't have the newest version of anything and some packages not at all, but you don't have to care about dependencies. Or updates. (Missing packages can be a problem: Is there a script to automatically generate .deb packages from PyPI? I haven't looked recently ...) > It seems backward compatibility is a taboo... I have recently written a script which checks out the newest version of the project, creates a fresh venv using a requirements.txt without version numbers and runs the test suite. If there is any action required (either because a test fails or because there is a newer version of any dependent package) it will create a ticket in redmine. Oh, and this script runs on a staging server which has the same Linux distribution (and hence the same Python version) as the production server. Seems to work, but that is only necessary because we are using venvs. If we relied on the distro's package management that would basically be a non-issue. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list