Windows 11 + one drive + pulling my hair out

This is likely the wrong forum for this, my apologies - I can’t seem to find a category that covers this.
I’m a Linux user for ~15 years, and only use windows when required at work.

I’ve been using python on my linux machine for about 3 years. I’m not an expert at all, but I can get by.

About a month ago work made me take my linux machine home because IT is worried about “security issues on toy operating systems.” I only ever use my windows machine for ONE app that doesn’t have a linux equivalent, but they are convinced using only microsoft will make everything more secure.

2 weeks ago they gave several of us new Dell laptops with windows 11.

“python engraver.py” worked just fine on it for the past 2 weeks.
Today, that same command gave me “python not found, run it without any switches to openthe microsoft store and install it from there.”
When I go to the microsoft store, it tells me I already have the latest version installed.
A little reading later, I uninstalled it, downloaded the installer from python.org, and installed it that way.
(Yes, I clicked the “add to path” chkbox.)

From a command prompt, “python engraver.py” ran without issue.

Then I closed the command prompt.
Went back to my source and made a tweak, launched the command prompt again.
Now I get “Python not found, run it without any switches to install it from the microsoft store.”

crap

So, uninstalled it, installed it this time from the microsoft store.

Same thing. Python not found. python --version returns “python is not installed…”

Every bit of reading I can find today tells me to install the python.org version, but that worked a total of one time, and after that one time it directs me to the microsoft store.

I tried launching it in the source file’s folder… which is mapped to C:\users\user\one drive - company name\documents\python\projects\demo That’s the one time it worked today. (And also where I’ve been using it for the past 2 weeks.)

I tried copying the source to the local drive so it doesn’t have to keep downloading the file from The Cloud, possibly the path name is suddenly too long, doesn’t allow spaces, heck I don’t know - it was working fine yesterday. Today, no matter where I launch it, no joy.

I’m sure there’s some well-known window trick to make it work, but my frustration with this is sitting on top of my frustration with being forced to use windows 11 and all of its popups and commercials and constant updates and bloat…

Am I overlooking something simple? How can it be this difficult to get this to run more than once on windows, when I have had Zero problems installing it on several linux machines?
Does it regularly just quit working? I mean - I was running it fine for 2 weeks until today.

Again, apologies for this being in the wrong category, but after messing with this since lunch, I honestly am ready to start drinking heavily.

1 Like

Use the py launcher instead of the python alias - far more reliable. But IDK what is happening on your system.

1 Like

My condolences on being forced to switch to Microsoft.
My company too provided me with a Windows machine, and I can’t use Linux because of “compliance”.

Initially when I just wanted to run Python, I installed Anaconda. That worked straight out of the box for a while.

What you’re describing reminds me of when my admins changed the windows account settings. Removing python from the “User Variables” Path (in Environment Variables settings) and adding it to the “System Variables” Path solved that problem.

(I’ve now got a fairly involved setup with WSL and a python version that I had to compile. Took quite some effort to set up. But I haven’t had to deal with it for some time fortunately. Still using python not py.)

2 Likes

Thank you for that.
Worked like a charm.

1 Like