Personally, I don’t use Windows and avoid it like the plague. Python is easy to install on Linux and Mac.
I’d start here: https://learn.microsoft.com/en-us/visualstudio/python/overview-of-python-tools-for-visual-studio?view=vs-2022listinfo/python-list__;!!Cn_UX_p3!gdOs-oC1JZcmvMXy1G4irRpzHCUmF565UXVdCjzSWNGZKpmZ04I_llDX4WUeob3asBCjLe6TIthAAhmwFgbph9u1m9A$>
From: Python-list <python-list-bounces+gweatherby=[email protected]> on behalf of Jim Lewis <[email protected]>
Date: Sunday, December 18, 2022 at 12:56 PM
To: [email protected] <[email protected]>
Subject: Fwd: Installation hell
*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***
I'm an occasional user of Python and have a degree in computer science. Almost every freaking time I use Python, I go through PSH (Python Setup Hell). Sometimes a wrong version is installed. Sometimes it's a path issue. Or exe naming confusion: python, python3, phthon311, etc. Or library compatibility issues - took an hour to find out that pygame does not work with the current version of python. Then the kludgy PIP app and using a DOS box under Windows with command prompts which is ridiculous. God only knows how many novice users of the language (or even intermediate users) were
lost in the setup process. Why not clean the infrastructure up and make a modern environment or IDE or something better than it is now. Or at least good error messages that explain exactly what to do. Even getting this
email to the list took numerous steps.
-- A frustrated user
-- https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!gdOs-oC1JZcmvMXy1G4irRpzHCUmF565UXVdCjzSWNGZKpmZ04I_llDX4WUeob3asBCjLe6TIthAAhmwFgbph9u1m9A$<https://urldefense.com/v3/__https:/mail.python.org/mailman/
That's not been my experience. Windows installers for Python have
worked well for me over many generations of Python releases. It's Linux where I've found difficulties. For example, if your distro's Python
install didn't include tkinter (or even pip), how do you get it? It's different for different Linux distros. I generally have to use internet searches to find out.
For another example, when you use pip to install a package, it sometimes suggests that you install a newer version of pip itself. Should you do
that? On Linux, probably not, because the distro will have modified pip
so it puts things in distro-specific places. Yet there is no newer
version of pip available through the distro's package manager. Will
anything bad happen if you don't update pip? Who knows?
I have a Linux VM that has several versions of Python3 on it. Python3.8
came installed with the distro, but for some programs I need Python
3.9+. If I forget which versions I have, how can I find out? People
say to use which, but that doesn't work - it only reports "python3".
This does work, but it's not all that easy to remember (the grep "site"
part is just to filter out uninformative result lines):
~$ find 2>/dev/null ~ -name python -type d |grep "site" /home/tom/.local/lib/python3.9/site-packages/PyQt5/Qt5/qsci/api/python /home/tom/.local/lib/python3.8/site-packages/pandas/_libs/src/ujson/python /home/tom/.local/lib/python3.10/site-packages/PyQt5/Qt5/qsci/api/python
Not that this task is much easier to remember on Windows, but it's not harder. One way: the "py" launcher will tell you:
py --list
-V:3.10 * Python 3.10 (64-bit)
-V:3.9 Python 3.9 (64-bit)
-V:3.7 Python 3.7 (64-bit)
-V:2.7
This is not Linux-bashing, but there's no need for Windows-bashing either.
On 12/19/2022 9:59 AM, Weatherby,Gerard wrote:
Personally, I don’t use Windows and avoid it like the plague.
Python is easy to install on Linux and Mac.
That's not been my experience. Windows installers for Python have worked well for me over many generations of Python releases.
It's Linux where I've found difficulties. For example, if your
distro's Python install didn't include tkinter (or even pip), how do
you get it? It's different for different Linux distros.
For another example, when you use pip to install a package, it sometimes suggests that you install a newer version of pip itself. Should you do that? On Linux, probably not, because the distro will have modified pip so it puts things in distro-specific places. Yet there is no newer version of pip available through the distro's package manager. Will anything bad happen if you don't update pip? Who knows?
I have a Linux VM that has several versions of Python3 on it. Python3.8
came installed with the distro, but for some programs I need Python 3.9+.
If I forget which versions I have, how can I find out?
People say to use which, but that doesn't work - it only reports
"python3".
~$ find 2>/dev/null ~ -name python -type d |grep "site" /home/tom/.local/lib/python3.9/site-packages/PyQt5/Qt5/qsci/api/python /home/tom/.local/lib/python3.8/site-packages/pandas/_libs/src/ujson/python /home/tom/.local/lib/python3.10/site-packages/PyQt5/Qt5/qsci/api/python
Not that this task is much easier to remember on Windows, but it's not harder. One way: the "py" launcher will tell you:
py --list
-V:3.10 * Python 3.10 (64-bit)
-V:3.9 Python 3.9 (64-bit)
-V:3.7 Python 3.7 (64-bit)
-V:2.7
On Tue, 20 Dec 2022 at 03:05, Thomas Passin <[email protected]> wrote:
That's not been my experience. Windows installers for Python have
worked well for me over many generations of Python releases. It's Linux
where I've found difficulties. For example, if your distro's Python
install didn't include tkinter (or even pip), how do you get it? It's
different for different Linux distros. I generally have to use internet
searches to find out.
If you want to use your distro's Python and add more stuff to it
globally, then yes, it depends on your distro. This is not really a
surprise.
For another example, when you use pip to install a package, it sometimes
suggests that you install a newer version of pip itself. Should you do
that? On Linux, probably not, because the distro will have modified pip
so it puts things in distro-specific places. Yet there is no newer
version of pip available through the distro's package manager. Will
anything bad happen if you don't update pip? Who knows?
Virtual environments work the same way regardless of distro, including allowing you to install an upgraded pip.
As long as your distro
provides the venv package (on Debian, that's in python3-venv), you can
just:
$ python3 -m venv env
$ source env/bin/activate
$ pip install -U pip
$ pip install -r requirements.txt
$ pip install some-package-name
$ etc etc etc etc etc
This is also a recommended way to do things on Windows, so you don't
even need to do things differently.
I have a Linux VM that has several versions of Python3 on it. Python3.8
came installed with the distro, but for some programs I need Python
3.9+. If I forget which versions I have, how can I find out? People
say to use which, but that doesn't work - it only reports "python3".
This does work, but it's not all that easy to remember (the grep "site"
part is just to filter out uninformative result lines):
Use what your shell already offers you! If you have multiple Pythons installed, type "python3" and hit tab twice. You should get a list of options. The exact shell you're using will affect how they're shown,
but I'm pretty sure most shells (at least, the ones designed to be interactive - /bin/dash might not) will give you some facility like
this.
rosuav@sikorsky:~$ python3
python3 python3.5-dbg-config python3.8-config
python3.10 python3.5dm python3.8m
python3.10-config python3.5dm-config python3.8m-config
python3.11 python3.5m python3.9
python3.11-config python3.5m-config python3.9-config
python3.12 python3.6 python3.9d
python3.12-config python3.6-config python3.9-dbg
python3.4 python3.6m python3.9-dbg-config python3.4-config python3.6m-config python3.9d-config
python3.4m python3.7 python3-config
python3.4m-config python3.7-config python3d
python3.5 python3.7m python3-dbg
python3.5-config python3.7m-config python3-dbg-config
python3.5-dbg python3.8 python3d-config rosuav@sikorsky:~$ python3
Yes, this is a bit noisy in that it has the -config and -dbg-config
tools listed as well, but you can easily see all the variants that are installed.
~$ find 2>/dev/null ~ -name python -type d |grep "site"
/home/tom/.local/lib/python3.9/site-packages/PyQt5/Qt5/qsci/api/python
/home/tom/.local/lib/python3.8/site-packages/pandas/_libs/src/ujson/python >> /home/tom/.local/lib/python3.10/site-packages/PyQt5/Qt5/qsci/api/python
Ugh, that's a horribly inefficient way to do it. All you need to do is
search $PATH. If tab completion isn't suitable, you could probably use "whereis python3", though it's probably a bit noisy.
Not that this task is much easier to remember on Windows, but it's not
harder. One way: the "py" launcher will tell you:
py --list
-V:3.10 * Python 3.10 (64-bit)
-V:3.9 Python 3.9 (64-bit)
-V:3.7 Python 3.7 (64-bit)
-V:2.7
This is not Linux-bashing, but there's no need for Windows-bashing either.
There's no need for Linux-bashing when Linux isn't the problem. :)
And Windows wasn't the OP's problem. Nor was Python. The OP moaned
about a lack of IDEs, when pretty much every IDE and text editor out
there has Python support.
We're not here to bash anything. Well, except maybe the popular Unix
shell. I'll /bin/bash that every day of the week... ahem. Anyhow.
We're here to share tips and help everyone be more productive.
ChrisA
On 12/19/2022 11:36 AM, Chris Angelico wrote:
On Tue, 20 Dec 2022 at 03:05, Thomas Passin <[email protected]> wrote:
That's not been my experience. Windows installers for Python have
worked well for me over many generations of Python releases. It's Linux >> where I've found difficulties. For example, if your distro's Python
install didn't include tkinter (or even pip), how do you get it? It's
different for different Linux distros. I generally have to use internet >> searches to find out.
If you want to use your distro's Python and add more stuff to it
globally, then yes, it depends on your distro. This is not really a surprise.
For another example, when you use pip to install a package, it sometimes >> suggests that you install a newer version of pip itself. Should you do
that? On Linux, probably not, because the distro will have modified pip >> so it puts things in distro-specific places. Yet there is no newer
version of pip available through the distro's package manager. Will
anything bad happen if you don't update pip? Who knows?
Virtual environments work the same way regardless of distro, including allowing you to install an upgraded pip.
I have always disliked working with venvs and avoid it whenever
possible. But I suppose that's just me.
It is however, quite noticable that almost everyone who asks a question
about their Python installation on this list is using Windows. I don't
think this is just because there are more Windows users than Linux or
Mac Users.
I have a Linux VM that has several versions of Python3 on it. Python3.8 came installed with the distro, but for some programs I need Python 3.9+. If I forget which versions I have, how can I find out?
I type python and then ctrl-D. The shell will then show me all commands starting with "python" in my path (your shell may have a different key combination for that, maybe tab-tab).
But that works only for Python. Shell expansion works for any command.
If you use Linux, learn how to use your shell (and maybe learn different shells - I personally prefer zsh, but I can also use bash, ksh, tcsh and
if necessary even sh).
On Tue, 20 Dec 2022 at 03:56, Peter J. Holzer <[email protected]> wrote:
It is however, quite noticable that almost everyone who asks a question about their Python installation on this list is using Windows. I don't think this is just because there are more Windows users than Linux or
Mac Users.
Yes. I think there are a few reasons for that. One is that there are
many many lazy people in the world, and those people are likely to (a)
use the OS that came with their computers - usually Windows or Mac OS;
I have a Linux VM that has several versions of Python3 on it. Python3.8 came installed with the distro, but for some programs I need Python 3.9+. If I forget which versions I have, how can I find out?
I type python and then ctrl-D. The shell will then show me all commands starting with "python" in my path (your shell may have a different key combination for that, maybe tab-tab).
Ah, interesting. When I mentioned tab-tab I was aware that there are
others, but I'm not familiar with Ctrl-D. Normally that means "send
the command as it is",
so I assume your shell is set up to take an unfinished command and tab-complete it. Which shell is that?
(Also - what happens if you Ctrl-D in the middle of a line? Does that work?)
But that works only for Python. Shell expansion works for any command.
If you use Linux, learn how to use your shell (and maybe learn different shells - I personally prefer zsh, but I can also use bash, ksh, tcsh and
if necessary even sh).
I agree, although I wouldn't recommend trying to get too much out of
sh as an interactive shell.
Personally, I don�t use Windows and avoid it like the plague. Python is easy to install on Linux and Mac.
I�d start here: https://learn.microsoft.com/en-us/visualstudio/python/overview-of-python-tools-for-visual-studio?view=vs-2022listinfo/python-list__;!!Cn_UX_p3!gdOs-oC1JZcmvMXy1G4irRpzHCUmF565UXVdCjzSWNGZKpmZ04I_llDX4WUeob3asBCjLe6TIthAAhmwFgbph9u1m9A$><https://urldefense.com/v3/__https:/mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!gdOs-
From: Python-list <python-list-bounces+gweatherby=[email protected]> on behalf of Jim Lewis <[email protected]>
Date: Sunday, December 18, 2022 at 12:56 PM
To: [email protected] <[email protected]>
Subject: Fwd: Installation hell
*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***
I'm an occasional user of Python and have a degree in computer science. Almost every freaking time I use Python, I go through PSH (Python Setup Hell). Sometimes a wrong version is installed. Sometimes it's a path issue. Or exe naming confusion: python, python3, phthon311, etc. Or library compatibility issues - took an hour to find out that pygame does not work with the current version of python. Then the kludgy PIP app and using a DOS box under Windows with command prompts which is ridiculous. God only knows how many novice users of the language (or even intermediate users) were
lost in the setup process. Why not clean the infrastructure up and make a modern environment or IDE or something better than it is now. Or at least good error messages that explain exactly what to do. Even getting this
email to the list took numerous steps.
-- A frustrated user
-- https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!gdOs-oC1JZcmvMXy1G4irRpzHCUmF565UXVdCjzSWNGZKpmZ04I_llDX4WUeob3asBCjLe6TIthAAhmwFgbph9u1m9A$<https://urldefense.com/v3/__https:/mail.python.org/mailman/
Sometimes it's a path issue.
"python.exe" and "python3.exe" -> "python.exe". In this case, thefirst installation in PATH is the default for running "python" and
Or exe naming confusion: python, python3, phthon311, etc.
Or library compatibility issues - took an hour to find out that
pygame does not work with the current version of python.
Then the kludgy PIP app and using a DOS box under Windows with
command prompts which is ridiculous.
using a DOS box under Windows
If you search a bit deeper, you'll find a site with unofficial WindowsSemi-OT: that's been a superb resource, but apparently it's no longer maintained - internet scuttlebutt suggests the project which let it
builds of many packages, including pygame for Python 3.11:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
There are a few ways to manage things:
1) Always use your package manager. Don't use pip at all.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 714 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 136:26:31 |
| Calls: | 12,087 |
| Files: | 14,997 |
| Messages: | 6,517,376 |