Re: python3 modules -- apt vs pip?
On 4/6/20 5:11 PM, Anil F Duggirala wrote: >> Python provides virtualenv, plus one can install most of the modules >> locally with pip3 install --user which will install the >> modules >> in ~/.local/lib and tools in ~/.local/bin, so don't forget to add >> this >> to your PATH. >> > > Could you please explain (to a newbie) exactly what are the advantages > of using the --user option and the possible drawbacks as well? please > Could you tell me why I wouldn't want to use a virtualenv? Is it just > because of the pain of having to activate this virtualenv every time I > want to use those modules? or am I losing any other functionality > provided by my system-wide python? > I am surprised this question was asked 2 days ago, I had the exact same > question today. The numpy module is on version 1.16.2 in the debian > repositories and is on version 1.18.2 in pip. > thank you, > virtualenv makes you flexible, you can have completely different environments isolated from each other. For example Debian Buster comes with python3.7 and you for whatever reason need python 3.4 or 3.8, or maybe both because of let's say application requirements. This would work with different envs. Installing modules with --user is easier but this way you have 1 environment in your home bound to the system python. Not every package in Debian can easily be updated. Updating numpy system-wide most likely will break tons of other software. But the same applies to pip to some extent, you may have a module requiring an old numpy which wouldn't work with the new one and so on.
Re: python3 modules -- apt vs pip?
> Python provides virtualenv, plus one can install most of the modules > locally with pip3 install --user which will install the > modules > in ~/.local/lib and tools in ~/.local/bin, so don't forget to add > this > to your PATH. > Could you please explain (to a newbie) exactly what are the advantages of using the --user option and the possible drawbacks as well? please Could you tell me why I wouldn't want to use a virtualenv? Is it just because of the pain of having to activate this virtualenv every time I want to use those modules? or am I losing any other functionality provided by my system-wide python? I am surprised this question was asked 2 days ago, I had the exact same question today. The numpy module is on version 1.16.2 in the debian repositories and is on version 1.18.2 in pip. thank you,
Re: python3 modules -- apt vs pip?
Alex Mestiashvili writes: > On 4/3/20 11:54 PM, Joe Pfeiffer wrote: >> I've been using apt (and friends) to maintain my systems, including >> python. Today I discovered the Debian version of the more-itertools >> module is on version 4.2.0 and is three years old. Meanwhile, the >> version documented on pypi.org is at version 8.2.0, and has at least one >> recipe whose arguments are in a different order from the Debian >> packaged version (grouper, whose order of arguments changed in version >> 6.0.0). This causes problems, as you might imagine, with other modules! >> >> So... do people generally use pip to maintain their python libraries, >> rather than apt? What's the recommended best practices here? >> > > I'd say the right course of actions would be to open a bug report that > there is a new upstream version available for python3-more-itertools. Good point -- just did it. > In general there are tons of modules which will never be packaged. So > depending on your needs you might need to maintain local modules. > > Python provides virtualenv, plus one can install most of the modules > locally with pip3 install --user which will install the modules > in ~/.local/lib and tools in ~/.local/bin, so don't forget to add this > to your PATH. > > I'd also say that one shouldn't use sudo pip3 since there are high > chances to mess up packages and system. > > Also should be careful with names of python packages since mistyping can > lead to installation of malicious software and with sudo it makes it > even more fun - google for "python malicious packages" Thanks for the warning!
Re: python3 modules -- apt vs pip?
On Sb, 04 apr 20, 11:01:24, Alex Mestiashvili wrote: > > Python provides virtualenv, plus one can install most of the modules > locally with pip3 install --user which will install the modules > in ~/.local/lib and tools in ~/.local/bin, so don't forget to add this > to your PATH. At least in buster (possibly even before) if $HOME/.local/bin exists it is automatically added to $PATH by all shells that source ~/.profile (this includes bash in Debian's default configuration). Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature
Re: python3 modules -- apt vs pip?
TOUCHÉ: Also should be careful with names of python packages since mistyping can lead to installation of malicious software and with sudo it makes it even more fun - google for "python malicious packages"
Re: python3 modules -- apt vs pip?
On 4/3/20 11:54 PM, Joe Pfeiffer wrote: > I've been using apt (and friends) to maintain my systems, including > python. Today I discovered the Debian version of the more-itertools > module is on version 4.2.0 and is three years old. Meanwhile, the > version documented on pypi.org is at version 8.2.0, and has at least one > recipe whose arguments are in a different order from the Debian > packaged version (grouper, whose order of arguments changed in version > 6.0.0). This causes problems, as you might imagine, with other modules! > > So... do people generally use pip to maintain their python libraries, > rather than apt? What's the recommended best practices here? > I'd say the right course of actions would be to open a bug report that there is a new upstream version available for python3-more-itertools. In general there are tons of modules which will never be packaged. So depending on your needs you might need to maintain local modules. Python provides virtualenv, plus one can install most of the modules locally with pip3 install --user which will install the modules in ~/.local/lib and tools in ~/.local/bin, so don't forget to add this to your PATH. I'd also say that one shouldn't use sudo pip3 since there are high chances to mess up packages and system. Also should be careful with names of python packages since mistyping can lead to installation of malicious software and with sudo it makes it even more fun - google for "python malicious packages"
Re: python3 modules -- apt vs pip?
2020. 04. 03. 23:54 keltezéssel, Joe Pfeiffer írta: > I've been using apt (and friends) to maintain my systems, including > python. Today I discovered the Debian version of the more-itertools > module is on version 4.2.0 and is three years old. Meanwhile, the > version documented on pypi.org is at version 8.2.0, and has at least one > recipe whose arguments are in a different order from the Debian > packaged version (grouper, whose order of arguments changed in version > 6.0.0). This causes problems, as you might imagine, with other modules! > > So... do people generally use pip to maintain their python libraries, > rather than apt? What's the recommended best practices here? > Keep using apt on your system. If you need newer libraries from pip, create virtual environment.
Re: python3 modules -- apt vs pip?
On Vi, 03 apr 20, 15:54:31, Joe Pfeiffer wrote: > I've been using apt (and friends) to maintain my systems, including > python. Today I discovered the Debian version of the more-itertools > module is on version 4.2.0 and is three years old. Meanwhile, the > version documented on pypi.org is at version 8.2.0, and has at least one > recipe whose arguments are in a different order from the Debian > packaged version (grouper, whose order of arguments changed in version > 6.0.0). This causes problems, as you might imagine, with other modules! > > So... do people generally use pip to maintain their python libraries, > rather than apt? What's the recommended best practices here? Depends on what you want to achieve. There was a recent discussion regarding Ruby gems, the same general principles should apply to Python. https://lists.debian.org/debian-user/2020/03/msg00950.html The methods to have separate Python modules and / or version installed might differ. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature
Re: python3 modules -- apt vs pip?
I always use pip. From: robo...@news.nic.it on behalf of Joe Pfeiffer Sent: Friday, April 3, 2020 11:54:31 PM To: debian-user@lists.debian.org Subject: python3 modules -- apt vs pip? I've been using apt (and friends) to maintain my systems, including python. Today I discovered the Debian version of the more-itertools module is on version 4.2.0 and is three years old. Meanwhile, the version documented on pypi.org is at version 8.2.0, and has at least one recipe whose arguments are in a different order from the Debian packaged version (grouper, whose order of arguments changed in version 6.0.0). This causes problems, as you might imagine, with other modules! So... do people generally use pip to maintain their python libraries, rather than apt? What's the recommended best practices here?
python3 modules -- apt vs pip?
I've been using apt (and friends) to maintain my systems, including python. Today I discovered the Debian version of the more-itertools module is on version 4.2.0 and is three years old. Meanwhile, the version documented on pypi.org is at version 8.2.0, and has at least one recipe whose arguments are in a different order from the Debian packaged version (grouper, whose order of arguments changed in version 6.0.0). This causes problems, as you might imagine, with other modules! So... do people generally use pip to maintain their python libraries, rather than apt? What's the recommended best practices here?