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.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to