Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your program is sick! Shoot it and put it out of its memory.


devel / comp.lang.python / Re: Persistent Error: Python was not found

SubjectAuthor
* Re: Persistent Error: Python was not foundMike Dewhirst
`* Re: Persistent Error: Python was not foundDennis Lee Bieber
 `- Re: Persistent Error: Python was not foundEryk Sun

1
Re: Persistent Error: Python was not found

<mailman.256.1660538756.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19196&group=comp.lang.python#19196

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: mik...@dewhirst.com.au (Mike Dewhirst)
Newsgroups: comp.lang.python
Subject: Re: Persistent Error: Python was not found
Date: Mon, 15 Aug 2022 14:38:25 +1000
Lines: 84
Message-ID: <mailman.256.1660538756.20444.python-list@python.org>
References: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com>
<c18deb22-9081-fdd0-4e23-f76f54672eac@dewhirst.com.au>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="------------1biuhxiV33mSO0Krazr0Uavx"
X-Trace: news.uni-berlin.de cUsRnLdd7l9Rbifal3nNqQYCNZ8Q8xV6+Ylg9ylVqR2A==
Return-Path: <miked@dewhirst.com.au>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'absolute': 0.05; 'content-
type:multipart/signed': 0.05; 'is.': 0.05; 'exit': 0.07;
'scripts.': 0.07; 'bat': 0.09; 'content-type:application/pgp-
signature': 0.09; 'git': 0.09; 'prompt,': 0.09; 'subject:not':
0.09; 'subject:Python': 0.12; 'downloaded': 0.13; '&gt;': 0.14;
'import': 0.15; '.py': 0.16; '??)': 0.16; 'aliases': 0.16;
'arguments': 0.16; 'decrypt': 0.16; 'failed.': 0.16;
'from:addr:dewhirst.com.au': 0.16; 'from:addr:miked': 0.16;
'from:name:mike dewhirst': 0.16; 'key.': 0.16; 'phishing.': 0.16;
'received:webmastery.com.au': 0.16; 'specify': 0.16;
'subject:found': 0.16; 'uninstalled': 0.16; 'virtualenv': 0.16;
'wrote:': 0.16; 'python': 0.16; "can't": 0.17; 'pm,': 0.19;
'to:addr:python-list': 0.20; "i've": 0.22; 'install': 0.23;
'command': 0.23; 'laptop': 0.23; 'run': 0.23; 'anything': 0.25;
'help.': 0.25; 'tried': 0.26; 'configure': 0.26; 'opening': 0.26;
'else': 0.27; 'settings': 0.28; 'error': 0.29; 'header:User-
Agent:1': 0.30; 'associate': 0.32; 'do.': 0.32; 'execution': 0.32;
'said,': 0.32; 'window': 0.32; 'but': 0.32; "i'm": 0.33; "i'll":
0.33; 'path': 0.33; 'received:192.168.0': 0.33; 'script': 0.33;
'windows': 0.34; 'able': 0.34; 'work.': 0.34; 'header:In-Reply-
To:1': 0.34; 'trying': 0.35; 'received:au': 0.35; 'files': 0.36;
"skip:' 10": 0.37; 'really': 0.37; 'using': 0.37; "it's": 0.37;
'directory': 0.37; 'received:192.168': 0.37; 'file': 0.38; 'put':
0.38; 'thanks': 0.38; 'added': 0.39; 'text': 0.39; 'handle': 0.39;
'prompt': 0.39; 'gone': 0.40; 'both': 0.40; 'want': 0.40;
'should': 0.40; 'tell': 0.60; '10,': 0.61; 'above': 0.62; 'me.':
0.62; 'day,': 0.62; 'point.': 0.62; 'python.org': 0.62; 'email':
0.63; 'send': 0.63; 'great': 0.63; 'everything': 0.63; 'public':
0.63; 'expert': 0.64; 'profile': 0.64; 'key': 0.64; 'your': 0.64;
'came': 0.65; 'content-type:multipart/mixed': 0.68; 'days,': 0.69;
'store,': 0.69; 'you.': 0.71; 'ignore': 0.71; 'private': 0.73;
'manage': 0.73; 'signature': 0.76; 'double-click': 0.84; 'luck':
0.84; 'fresh': 0.91; 'received:103': 0.91
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.12.0
Content-Language: en-US
In-Reply-To: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com>
X-PPP-Message-ID: <20220815043835.32355.34748@plesk01.e1.webmastery.com.au>
X-PPP-Vhost: chemintro.com
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <c18deb22-9081-fdd0-4e23-f76f54672eac@dewhirst.com.au>
X-Mailman-Original-References: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com>
 by: Mike Dewhirst - Mon, 15 Aug 2022 04:38 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

Jonathan
This is what I would do ...
1.    Download Python from python.org not Microsoft
2.    Install as an expert or custom install to C:\Python310 rather than
C:\Program files
3.    Ignore this point - I was going to mention VirtualEnv which comes
later for software development and thereafter you don't need to put
Python on the Windows path. As I said, ignore this point.
4.    Add C:\Python310\Scripts to the path (system or user)
5.    Add C:\Python310 to the path after C:\Python310\Scripts
6.    Open a cmd prompt and enter python to prove it starts then quit.
Exit the cmd window
7.    Create a directory in the root of your user profile
(C:\Users\Jonathan ??) called pythontest
8.    Save 'print("hello world")' in a text file called hello.py in the
above directory
9.    Open a cmd prompt and type > python
C:\Users\Jonathan\pythontest\hello.py
Should work.
If you want to execute a python script without first opening a cmd
prompt, you need a bat file or shortcut which contains the command line
you want executed. Give that a double-click and it should also work.
If Python is on the path you don't need to specify where it is.
You do need to tell Python what you want it to execute.
It is possible that you can associate .py files with Python but that
would be a step too far for me.
Good luck
M
On 13/08/2022 9:55 pm, Jonathan Owah wrote:
> Good day,
> Great job on making Python easily accessible.
>
> I'm using a Windows 10, 64gb HP EliteBook.
>
> I've been trying to configure my laptop to run python scripts.
> This is the error I keep getting:
> Python was not found; run without arguments to install from the Microsoft
> Store, or disable this shortcut from Settings > Manage App Execution
> Aliases.
>
> Everything I've tried has failed.
> I've uninstalled and reinstalled
> I've added to path, both user and system path,manually and from fresh
> installation
> I've downloaded from Microsoft Store
> I've gone to manage app aliases and switched off
> I've used Git Bash, Powershell, cmd
>
> I'm able to check my python version: 3.10.6.
>
> I can't do anything else and it's really frustrating.
>
> I've been at it for days, I don't know what else to do.
>
> Thanks in advance for your help.
>
> Regards

--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: Persistent Error: Python was not found

<2olkfhpkjaq29lffkb37su2pvsp6n1tfdj@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19203&group=comp.lang.python#19203

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 15 Aug 2022 14:26:00 +0000
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.python
Subject: Re: Persistent Error: Python was not found
Date: Mon, 15 Aug 2022 10:27:56 -0400
Organization: IISS Elusive Unicorn
Message-ID: <2olkfhpkjaq29lffkb37su2pvsp6n1tfdj@4ax.com>
References: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com> <c18deb22-9081-fdd0-4e23-f76f54672eac@dewhirst.com.au> <mailman.256.1660538756.20444.python-list@python.org>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 25
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-BwgWAMtUfsgrAhdr+HkBDh2x51kCLlUADvhd3yuBowxVGdMiUvUEN8eJuBdHq6aoGD6spSghNwnJTYs!P6yFemIVYv9gLTpukEJAM48qPAXDElClJUTSJEp9IbUpo3Dyr8ZMx7Bvz+lQhtMJiyHI7eej
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Dennis Lee Bieber - Mon, 15 Aug 2022 14:27 UTC

On Mon, 15 Aug 2022 14:38:25 +1000, Mike Dewhirst <miked@dewhirst.com.au>
declaimed the following:

>If you want to execute a python script without first opening a cmd
>prompt, you need a bat file or shortcut which contains the command line
>you want executed. Give that a double-click and it should also work.
>

I've never had to do that... But I have file associations set up so
that .py is considered to be an executable file.

Just double-clicking on the file will run it. The problem is that it
will open a command shell, run, and then close the command shell UNLESS one
explicitly codes some sort of "hold" at the end of the program

jnk = input("Press return to exit")

.pyw extension does not open the command shell -- but is meant for
programs that use one of the various GUI frameworks, which is probably more
than the new-comer is ready to attack.

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: Persistent Error: Python was not found

<mailman.264.1660582014.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19206&group=comp.lang.python#19206

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: eryk...@gmail.com (Eryk Sun)
Newsgroups: comp.lang.python
Subject: Re: Persistent Error: Python was not found
Date: Mon, 15 Aug 2022 11:46:50 -0500
Lines: 15
Message-ID: <mailman.264.1660582014.20444.python-list@python.org>
References: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com>
<c18deb22-9081-fdd0-4e23-f76f54672eac@dewhirst.com.au>
<mailman.256.1660538756.20444.python-list@python.org>
<2olkfhpkjaq29lffkb37su2pvsp6n1tfdj@4ax.com>
<CACL+1avC_ubXWbN4FE39KOOzLZo849qmE6BcmaaYxgD-yqr9HQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de WEqQ2NMbZcgNE81PDQl62QyjFCdplafuSzwoquv4rTrw==
Return-Path: <eryksun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=Q0B5hBD3;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'codes': 0.07; 'exit':
0.07; 'explicitly': 0.07; 'tab': 0.07; 'cc:addr:python-list':
0.09; 'console,': 0.09; 'subject:not': 0.09; 'terminal': 0.09;
'subject:Python': 0.12; 'cc:no real name:2**0': 0.14; 'app,':
0.16; 'classic': 0.16; 'run,': 0.16; 'subject:found': 0.16;
'wrote:': 0.16; 'problem': 0.16; 'cc:addr:python.org': 0.20;
'code': 0.23; 'command': 0.23; 'run': 0.23; 'cc:2**0': 0.25;
'11,': 0.26; 'program': 0.31; "doesn't": 0.32; 'window': 0.32;
'message-id:@mail.gmail.com': 0.32; 'unless': 0.32; 'windows':
0.34; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'close': 0.35; 'from:addr:gmail.com': 0.35; 'display': 0.36;
"it's": 0.37; 'received:209.85': 0.37; 'file': 0.38; 'could':
0.38; 'received:209': 0.39; 'skip:o 10': 0.61; 'skip:k 10': 0.64;
'implemented': 0.76; 'allocated': 0.84; 'inherit': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:from:to:cc;
bh=FUc7scnUgoyvgF9mRduEf0ufiUxzaQecKZVDkdBKaW0=;
b=Q0B5hBD3a0KG0/T7bGPXLw/9KEOo8qVeajlqohgNSr55BW1TMh5uc+M0MCB89g1QXr
y87bzr+eBHh0PiW7p7EHt88y5/4MzyY0bxBWFqsv5XJgyQW1+Ivdzo5l6DClY5px9j5I
7PQTc+KBLb2KooRC737HRAyjUEvdBuhfloRauZJwAUrARtivM2RQxCuBUP1CxCxnQR/d
v98Acfm561y5Q89oGzZxpo2pMXBXUCLmJtj34QEBmbQqV1gceNk17pWuvTDA80vrEjT1
LGIyPsDnQ0CzQTD22hJWpRZeyi1659B8mZ/dZANrmvc820KO3ObZ6FPG7TXTD8N+2Fo7
YPVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:x-gm-message-state:from:to:cc;
bh=FUc7scnUgoyvgF9mRduEf0ufiUxzaQecKZVDkdBKaW0=;
b=hcH6+55KBKFjXxIGe0t2NDvUxQp3dMh9E/T6U+AyjL7EIExArq1RcidQTZBXtsBIV6
UNXM01MoHr9bM61vA55z/zSZoGWumZPIX8FNKUjWR2+2lvQkPKe9znC3BDLUrxUeuWx1
3TQrdlQvkx7I8sLR6nf2r31UOkrate9xs1e70VWmhSo7oLiZJxYp0OGm9wTeOZI0CzZd
zf3l+vfen5Tjpsu0IGd2g8SZoEljLgHl70Hh5+o2tUJXb9XK8s5S8haxkpzgYJTiOY8F
ShusIiUMEY9vleqtUlyGnYCjeGY8ao9+6FQ47aOjROUE4nphnLbe2FIldgzjmdAJGqud
gqAw==
X-Gm-Message-State: ACgBeo2rTqrMbNy2OVWuHbWVmGGtushoZ0iqj9vuF++yd/gIxiewUSh3
qrwBkS2jjFVtqGZ1TD7iLlZUjiBbyMB1wrJCIVToHPlq
X-Google-Smtp-Source: AA6agR7eANbZNOiZG6HoxzkszjCxqq29ylrDWcBdq8U7Ch6cUkXCkDWK61JUINmWPFqsss4rK5rQI0iU8KuMZB57vUM=
X-Received: by 2002:a63:6bc5:0:b0:41c:26d2:81e2 with SMTP id
g188-20020a636bc5000000b0041c26d281e2mr14079989pgc.522.1660582011344; Mon, 15
Aug 2022 09:46:51 -0700 (PDT)
In-Reply-To: <2olkfhpkjaq29lffkb37su2pvsp6n1tfdj@4ax.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CACL+1avC_ubXWbN4FE39KOOzLZo849qmE6BcmaaYxgD-yqr9HQ@mail.gmail.com>
X-Mailman-Original-References: <CALwmfg==UiA4qvyzc4GgOW-xM2OPfxZtMiH-=g-S5g3u-kmZQA@mail.gmail.com>
<c18deb22-9081-fdd0-4e23-f76f54672eac@dewhirst.com.au>
<mailman.256.1660538756.20444.python-list@python.org>
<2olkfhpkjaq29lffkb37su2pvsp6n1tfdj@4ax.com>
 by: Eryk Sun - Mon, 15 Aug 2022 16:46 UTC

On 8/15/22, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
>
> Just double-clicking on the file will run it. The problem is that it
> will open a command shell, run, and then close the command shell UNLESS one
> explicitly codes some sort of "hold" at the end of the program

The console window is a terminal, not a shell. If an application is
flagged as a console app, as is "python.exe", and the process doesn't
inherit a console, the initialization code in kernelbase.dll allocates
a new console session. This could be implemented by the classic
conhost.exe host, or, in Windows 11, by an openconsole.exe session
that's associated with a tab in Windows Terminal. If it's the latter,
Terminal can be configured to keep a tab open after the console
session has ended. The tab will display the exit status of the process
that allocated the console session.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor