Re: Persistent Error: Python was not found
Eryk Sun wrote: If the redirector app is run without arguments, it will open the Microsoft Store to install the latest version of the Python store app distribution. Currently that means Python 3.10. That is true with cmd. But with a shell like 4NT, I get: c:\> "%LocalAppData%\Microsoft\WindowsApps\python.exe" 4NT: (Sys) No access to the file. "C:\Users\gvane\AppData\Local\Microsoft\WindowsApps\python.exe" No matter what I do with this "App Alias" setting. What a broken and confusing design this AppX design is. -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Changing 'Scripts/*.exe'
Hello list. I'm moved my old Python27 installation from f:\ProgramFiler\Python27 ( == 'ProgramFiles') to f:\gv\Python27 and now many 'scripts/*.exe' program fails to start since the old path to 'Python.exe' is wrong. E.g. 'Scripts/pip2.exe' has the path "f:\programfiler\python27\python.exe" hard-coded inside it. Is there a easy way to fix this w/o re-installing this old Python? -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: Changing 'Scripts/*.exe'
dn wrote: E.g. 'Scripts/pip2.exe' has the path "f:\programfiler\python27\python.exe" hard-coded inside it. Is there a easy way to fix this w/o re-installing this old Python? Yes, by putting a symbolic-link at the old 'programfiler' location which points to the new 'gv' installation. I'm suspicious about sym-links. Instead for 'pip' I just did a 'py -2 get-ip.py' which seems to have fixed it. The newly generated 'f:\gv\Python27\Scripts\pip2.exe' seems to work fine; the list from 'pip2.7.exe list' is correct. -- --gv -- https://mail.python.org/mailman/listinfo/python-list
pip issue
Hello list. I have an issue with 'pip v. 22.3.1'. On any 'pip install' command I get warning like this: c:\> pip3 install asciinema WARNING: Ignoring invalid distribution -arkupsafe (f:\gv\python310\lib\site-packages) WARNING: Ignoring invalid distribution -arkupsafe (f:\gv\python310\lib\site-packages) Collecting asciinema Downloading asciinema-2.2.0-py3-none-any.whl (92 kB) ... Otherwise no issues. But where is this text "-arkupsafe" stored and how to get rid it it? I've searched through all of my .pth files and found no such string. I assume this is an entry for an orphaned package "MarkupSafe" since a 'pip list | grep markup' will list 'MarkupSafe 2.1.1'. -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: pip issue
Dieter Maurer wrote: Otherwise no issues. But where is this text "-arkupsafe" stored and how to get rid it it? I've searched through all of my .pth files and found no such string. Have you looked at the content of the folder mentioned in the warnings (e.g. `...\site-packages`). I had 2 folders named: site-packages\~arkupsafe\ site-packages\~arkupsafe-2.1.1.dist-info\ Removing those, the problem was gone. So perhaps this tilde '~' means something special for pip? -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Q: argparse.add_argument()
I accidentally used 'argparse' like this in my Python 3.9 program:
parser.add_argument ("-c, --clean", dest="clean", action="store_true")
parser.add_argument ("-n, --dryrun", dest="dryrun", action="store_true")
instead of:
parser.add_argument ("-c", "--clean", dest="clean", action="store_true")
parser.add_argument ("-n", "--dryrun", dest="dryrun", action="store_true")
So any use of 'my-prog.py -cn' threw an error:
error: unrecognized arguments: -cn
So is there something that throws an error on this wrong use of
"-c, --clean" instead? Could be useful. Or is "-c, --clean" legit somehow?
--
--gv
--
https://mail.python.org/mailman/listinfo/python-list
Re: Q: argparse.add_argument()
Thomas Passin wrote:
Are you trying to troll here?
You just showed how you got an error with this construction, so why are you
asking how to
get an error with this construction?
I meant (obviously), another error-message besides:
error: unrecognized arguments: -cn
Perhaps from 'parser.add_argument ("-c, --clean", dest="clean",
action="store_true")'
error: "-c, --clean", 2 options are unsupported.
BTW, accusing someone of 'trolling' is rather rude IMHO.
And thanks to ChrisA for a nice and normal answer.
--
--gv
--
https://mail.python.org/mailman/listinfo/python-list
Re: Q: argparse.add_argument()
Thomas Passin wrote: So please, try to think out how your questions will seem to the reader, and be clear about what you are asking. You may not know the terminology that some other people use, but don't let that stop you from being clear about what you really need to find out. Including more context is likely to be helpful, too. Don't leave it to the readers to infer what you were thinking of. I'll do that. My post was written in a bit of a hurry and frustration after struggling with my 'typo' for 30 minutes. -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation
Dennis Lee Bieber wrote: Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter "pip.*" Tried it. Oh man what a slow process: sync & timer & pwsh -Command Get-ChildItem -Path F:\gv\Python310\ -Recurse -Name -Filter "pip.*" & timer (15 results stripped). Completed in 12.44 sec! As opposed to my own Envtool: sync & timer & envtool.exe --evry pip.* | grep "Python310" & timer (15 results stripped) Completed in 0.57 sec! But I have 5 GByte of stuff under 'f:\gv\Python310\' Envtool is at https://github.com/gvanem/Envtool Works best together with the amazing EveryThing search engine by David Carpenter at https://www.voidtools.com -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: Windows: subprocess won't run different Python interpreter
Thorsten Kampe wrote: > My goal is to verify that other shells/interpreters on Windows work > the same way as Python when running an application or creating a sub- > process. Cmd does not. What's else there? I have Bash here but that's > a Cygwin executable. And Cygwin Python does not work like Windows > Python. > > Any ideas? Is there a Python.exe in the Registry "App Paths". Either of these: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths or HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: The next major Python version will be Python 8
Michael Selik wrote: > It suddenly occurred to me that if Microsoft announced it's > Ubuntu-in-Windows feature today, no one would believe it. My feeling too, but this was announced 30 March. In the video in this link: http://www.cnx-software.com/2016/03/31/microsoft-brings-bash-on-ubuntu-on-windows-10/ they say Python inside Ubuntu-in-Windows works! Ref. time 03:03. -- --gv -- https://mail.python.org/mailman/listinfo/python-list
Re: How to Add ANSI Color to User Response
Pierre Fortin wrote: Over the years, I've tried different mechanisms for applying colors until I got my hands on f-stings; then I created a tiny module with all the colors (cR, cG, etc) which made my life so much simpler (attached). Attachments are stripped off in this list. It would be nice to see this tiny module of yours. An URL or attach as inline text please. -- https://mail.python.org/mailman/listinfo/python-list
