#๐ Python "Setup Failed" Help
257 messages ยท Page 1 of 1 (latest)
@wary jolt
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
!paste Could you send the log file for this?
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Do you need any specific part?
I'd need the complete log.
There was an error uploading your paste.
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Is it good?
yep, that's fine
You need to run the installation as a local administrator.
You can try running as admin, yeah.
I did it
There are two somewhat concerning things though: the first is that system restore points are disabled (the installer tries to make one but fails) and the second is that it fails when installing the core libraries which is odd.
You mean "Run as Administrator"?
yers
yes
also I installed python from Microsoft store after facing this problem and it magically got installed without any error as it may have directly been installed. I don't know but try if it works for you too.
I did it multiple times.
The problem is new as the pip was not working despite a lot of attempts.
And now after tring to install Python again it fails too.
Just to clarify, are you installing anywhere else other than the default directory it chooses for you?
I actually prefer to install from the website to a particular directory, so there are some problems for me if I am to install from MS Store.
Yes. I have always installed in custom directories.
Was your previous installation on the boot drive (usually your C drive)?
No, I never install in the C drive.
Things were absolutely fine till a few days back.
Where is the problem then?
I'm not completely sure how Python deals with installs that aren't in the boot drive. It could be an issue with that.
The eror it's throwing at the end, 0x643, could mean a fatal issue (which could be anything) or it can also be a file in use error.
No files related to Python are running.
Btw, what do you mean by that?
"install Python again" - did you properly uninstall it first?
'pip' is not recognized as an internal or external command,
operable program or batch file.
This is being shown in cmd.
I used the Python uninstaller and revo.
Each component creates a more detailed log. Can you locate the log at %LocalAppdata%\Temp\Python 3.13.5 (64-bit)_20250707205758_000_lib_JustForMe.log and send it?
!dash-m-pip
When trying to install a package via pip, it's recommended to invoke pip as a module: python -m pip install your_package.
Why would we use python -m pip instead of pip?
Invoking pip as a module ensures you know which pip you're using. This is helpful if you have multiple Python versions. You always know which Python version you're installing packages to.
Note
The exact python command you invoke can vary. It may be python3 or py, ensure it's correct for your system.
On windows you're supposed to run python with py, so you'll run pip with py -m pip
I am taking a look.
"py" is unrecognised.
Yeah, you don't have that anymore.
Now it is, because you uninstalled python. I'm saying that when you had python, pip wasn't broken
But when I ran the following, the error was still there:
pip --version
There was an error uploading your paste.
What do you suggest?
It fails very weirdly with a stack overflow.
i would give up like reinstall OS because this is giving me a headache... good luck anyways
Here are two more relevant errors though:
- 1322 being "A portion of the folder path is invalid. It is either empty or exceeds the length allowed by the system."
- 1324 being "The folder path contains an invalid character. "
But neither was an issue in any previous installations.
During a couple other times, repairing the installation worked. This is the first time of this happening to the PC.
Hi i'm glad to hear that it solved ur problem
please type !close
It is indeed very odd. Never seen it.
The information on Stack Overflow and Discord was scarce too.
What do you mean?
Going by 1322, it could be the "exceeds the length allowed" part.
I know when I need to close it bud.
Can you go to your terminal and check what the following returns?
reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled
you said repair helped fix ur problem please type !solved
You have not read properly. I said it did before under different circumstances.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
LongPathsEnabled REG_DWORD 0x0
There we go. Now run:
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 0x1 /f
to enable that setting then run the installer again.
ERROR: Access is denied.
Run your terminal as admin then try again.
The setting modification was successful but not the Python installation.
@fair leaf, any reason why it might be failing repeatedly?
The other is the "invalid path" error but I'm unable to see why it would be invalid.
Was it the same error?
Yes.
Maybe try restarting the system. The registry setting might only apply then.
Did that too, the problem is very peculiar as nothing changed despite applying different methods.
I am restarting for one last time.
Should I use admin both the privileges and run as administator during the installation?
Yep.
What are the advantages of enabling the admin priviledges?
That did not work.
It's mainly to avoid permissions issues that you might have if you were installing as a user.
also same error I'm guessing?
Indeed.
Why could the problem occur all of a sudden?
Was uninstalling all of the python files from the C drive using revo installer a red flag?
I'll just chalk it up to "Windows being Windows".
It's also possible that Revo might have messed something up.
Can you go back to Revo and check that it doesn't list Python anymore?
Any way to fix it?
You mean the Python executible and installer?
Now that you have said it, I think this might be at the root of the cause. I never uninstalled all of the Python files from all the drives using Revo Uninstaller.
Do you have any suggestions for that?
I want to check whether it still thinks it's installed.
No, Revo Uninstaller detects nothing related to Python.
Just curious, is there any file related to Python that comes preloaded with Windows before the first Python installation?
Not really, nope.
I've seen installs fail but not to this extent so I'm pretty much left to trial and error.
Can you send the new log file? I want to check if something changed.
I am pretty new to programming too, so I am left with no other choices.
Could it be the weird S:/ install path
I suspect it's that, but they mention they had no issues with it earlier.
You should try on C:/:pithink:
It never had been to begin with.
I don't have a lot of storage left there.
Looks like a bunch of the same unfortunately.
At least try if it work
If you haven't install any package, you shouldn't use much space, and see if it work/not, you can still decide to uninstall it
What do we do now?
Is that the only option left?
I mean, for troubleshoot, it is the most sensible step to do
You can assume that this is my first Python installation as I have 0 Python files remaining in my hard drive.
Probably, again, I'm not sure how Python handles installs in other places.
So you are telling me to install Python in the default installation directory by the installer?
Yeah
Does it take like 0.5 GB of the installation space?
A Python install as is shouldn't take more than 200-ish MB.
Nevermind, that didn't work either.
This is a huge problem in that case.
Some people recommended installing Python 2 if such problem occurs.
Fallback: use uv to install python
Please don't do that, they are not supported at all now
uv?
They are a package manager that allows you to install standalone python
Don't do Python 2 -- you shouldn't use it anymore. But it's possible that installing another version (like Python 3.12) could work.
Wouldn't the problem technically be the same?
Possibly, possibly not.
Though I suspect "possibly" because this looks like permissions but you can try.
If you want to try uv:
https://docs.astral.sh/uv/getting-started/installation/
uv is an extremely fast Python package and project manager, written in Rust.
Do I need to install anything manually before the Python installation, like pip?
I am going for the previous version first.
No, pip is installed by python
-# * - unless you use uv python install, then yes you need to first install uv
(Because here you run pip, not py -m pip...)
And also python still doesn't exist
That was before the deletion.
Oh well
Installing the previous version first, should I go for some other 3.13 or previous versions?
Another question, what is "WIndows embedded package" in Python installation?
You shouldn't use that one
What does that do?
It basically have a zip file contain python
But as far as I remember it have some limitations
Which I don't exactly remember
It's a zipped version of Python that's mainly useful for when you want to embed Python in another application. The limitations with it though are that it doesn't package things like Tkinter and it also doesn't come with pip by default.
Okay.
Can I rename a Python file name after the files have been installed in it?
Not in PATH,
nor recognised by py launcher.
And for some reason doesn't add cwd to PATH when running a file, so your imports WILL be broken (we once encountered it in #1035199133436354600)
That's what I can list without looking anything up
A Python file? As in files just installed? Or your own code file with python code?
I mean the folder where the Python files are installed by the installer file.
Never modify installed stuff
Update: Python 3.12 is installed.
That's how you break stuff. Only use installer to modify/repair ANY program. Because installing isn't just unpacking random files in random place, it adds changes to the system registry as well
You mean the file directory name in the code in a nutshell?
But the problem with Python 3.13 still persists despite 3.12 working well.
What is this problem for?
And should Python be installed for all users or just the current one?
Think either should work, though you can try first with all users.
Neither worked.
What is the possible problem with 3.13 but not 3.12?
I'm still not sure though again we know it's probably due to Revo or as a result of modifying the install improperly.
Do you know how to redo the state that Python was in before the Revo uninstallation?
This is where perhaps the system restore point that the uninstaller makes might have helped but that seems to be disabled for some reason.
The system restore point was enable during the process.
Alright, though the log sent says it's disabled.
How can I fix that? Python 3.13 is still the latest version in line.
It has a fair bit of steps to it. You can go to Settings > System > About then to Advanced System Settings and after that to System Protection. That should help in checking if it's actually enabled.
What should I particularly look for there?
Just check if going to that tab or trying to create a restore point doesn't throw any sort of errors.
All of the protections are disabled and I am unable to click on System Restore.
You can follow this guide to reenable it, though I presume it's because of storage that it's not letting you.
Anyways, if you do want Python 3.13, this is pretty much a last resort but you can try sending the output that this tool sends: pywintrbl. It's a tool I wrote a while ago to debug things like this. Perhaps it's helpful here.
But otherwise you can either use 3.12 since that installed successfully or try to install 3.13 through uv as someone else suggested.
Also, maybe installing 3.13.4 might work, though since it's in the same line as 3.13, it's unlikely.
What will the tool do?
It simply finds the Python installations on your system and any possible leftovers and lists them out.
Will just installing the .exe work?
Sure.
There are quite a lot of files related to 3.13.3 and 3.13.5.
The tool outputs an HTML file. Can you send that?
That's not the file
The bot gives error.
forgot that the server won't let you send those files, so please send it through the paste.
https://paste.pythondiscord.com/
!paste -- here are the steps for it
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
You go to the website
You upload the file on the website
You paste
You copy the link
You paste the link here
Which website are you talking about?
Also doing pywintrbl > log.txt and sending that should work. The output should be the same.
The website from the bot / mentioned by Tekgar
Is this good?
Yep, that's fine. As you mentioned, there's 3.13 entries listed and some for 3.15.
The installer did manage to register itself so it partially installed something.
Tekgar cover everything I would say and probably know more than me for this
Okay.
You'd need to get rid of the 3.13 ones.
If Revo doesn't list them, then perhaps BCUninstaller does: https://www.bcuninstaller.com/.
Can I not manually delete each of them?
So how do I make Revo list all of the remaining files?
I could list out how to remove them but I want to try BC first since that's easier.
If I am correct, you just mean getting the list of all the remaining Python files.
Am I wrong?
I just want to check if BCUninstaller lists out the applications the tool found.
Otherwise we'd need to do it manually.
I have a program called WizFile. It lists all the files and folders in the entire OS with advanced search features.
Would that help?
I am going AFK for 15 minutes.
It might help if we have to delete it manually.
For now just check with BC and remove it from there if they appear.
What do you want to do with BCUninstaller? Can you tell me the process?
I just want to know whether it lists the installations found by the tool and, if they are, you can try uninstalling them with BC.
So basically you want me to delete the 3.14.3 files?
Yes, using BCUninstaller if possible.
I found out that they are different Python files, mainly of VS Code.
They are not separately installed but bundled with VS Code.
Let's ignore WizFile for now. Just check if BC lists them.
For example, there's "Python 3.13.3 Standard Library (64-bit)", check if BCUninstaller lists that or something similar.
I am checking it.
Yes, it successfully lists the related Python files.
What's next?
You there @fair leaf?
There are just some leftover files remaining.
Just uninstall them as you did with Revo.
If the uninstall was successful, then you can try installing 3.13 again.
Well, I removed all of the 3.13 files and it worked at last.
Thanks a lot for the help.
Others quitted, but you remained and helped, so thanks for that.
Should I close it now?
If you don't have any other questions, then feel free to close it.
I have one last query.
How long have you been programming for?
What advice would you give me to troubleshoot the problems better next time? What should I learn and how can I be better at fixing the problems?
It mostly require specific knowledge
I've been at this for the past 8 years or so. With Python probably the last 5.
Such as?
Knowing what registry it edit etc.
Stuff that you won't know if you normally using Python
Which I don't have for example, so I just stay silent
I also mean Computer Science in general.
For some parts it comes down to trial and error. Also just experience that you acquire over the years probably helps.
As you saw here, it was mostly a matter of reading logs, searching up errors, and trying different routes to see if they work.
What CS concepts help you troubleshoot the problems?
Most likely he read the source code of CPython for some part for this
But since I've seen this issue happen a few times in the past, I do have a more outlined series of steps that I can follow (like some of what we did here).
(this isn't really that much of a Python issue, it mostly comes down to how uninstallers in general work, though there are parts that are related)
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.