#๐Ÿ”’ Python "Setup Failed" Help

257 messages ยท Page 1 of 1 (latest)

sharp hollowBOT
#

@wary jolt

Python help channel opened

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.

fair leaf
#

!paste Could you send the log file for this?

sharp hollowBOT
#
Pasting large amounts of code

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.

wary jolt
fair leaf
sharp hollowBOT
#

There was an error uploading your paste.

#
Pasting large amounts of code

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.

wary jolt
#

Is it good?

fair leaf
#

yep, that's fine

drifting meadow
#

You need to run the installation as a local administrator.

fair leaf
#

You can try running as admin, yeah.

wary jolt
#

I did it

fair leaf
# fair leaf You can try running as admin, yeah.

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.

wary jolt
drifting meadow
#

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.

wary jolt
wary jolt
#

And now after tring to install Python again it fails too.

fair leaf
wary jolt
wary jolt
fair leaf
#

Was your previous installation on the boot drive (usually your C drive)?

wary jolt
#

Things were absolutely fine till a few days back.

#

Where is the problem then?

fair leaf
#

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.

wary jolt
#

No files related to Python are running.

tender sail
tender sail
wary jolt
#

This is being shown in cmd.

wary jolt
fair leaf
sharp hollowBOT
#
Install packages with `python -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.

tender sail
#

On windows you're supposed to run python with py, so you'll run pip with py -m pip

fair leaf
#

Yeah, you don't have that anymore.

tender sail
wary jolt
sharp hollowBOT
#

There was an error uploading your paste.

fair leaf
#

It fails very weirdly with a stack overflow.

drifting meadow
#

i would give up like reinstall OS because this is giving me a headache... good luck anyways

fair leaf
# wary jolt What do you suggest?

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. "
wary jolt
#

During a couple other times, repairing the installation worked. This is the first time of this happening to the PC.

drifting meadow
#

please type !close

fair leaf
drifting meadow
#

NO

#

its actually

#

!solved

#

not !close

wary jolt
wary jolt
fair leaf
wary jolt
fair leaf
#

Can you go to your terminal and check what the following returns?

reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled
drifting meadow
wary jolt
wary jolt
fair leaf
fair leaf
wary jolt
#

@fair leaf, any reason why it might be failing repeatedly?

fair leaf
wary jolt
fair leaf
#

Maybe try restarting the system. The registry setting might only apply then.

wary jolt
#

Did that too, the problem is very peculiar as nothing changed despite applying different methods.

#

I am restarting for one last time.

wary jolt
wary jolt
fair leaf
fair leaf
wary jolt
#

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?

fair leaf
#

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?

wary jolt
wary jolt
wary jolt
#

Do you have any suggestions for that?

fair leaf
wary jolt
#

Just curious, is there any file related to Python that comes preloaded with Windows before the first Python installation?

fair leaf
#

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.

wary jolt
proper prism
#

Could it be the weird S:/ install path

fair leaf
#

I suspect it's that, but they mention they had no issues with it earlier.

proper prism
#

You should try on C:/:pithink:

wary jolt
wary jolt
fair leaf
#

Looks like a bunch of the same unfortunately.

proper prism
#

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

wary jolt
proper prism
#

I mean, for troubleshoot, it is the most sensible step to do

wary jolt
#

You can assume that this is my first Python installation as I have 0 Python files remaining in my hard drive.

fair leaf
wary jolt
#

So you are telling me to install Python in the default installation directory by the installer?

fair leaf
#

Yeah

wary jolt
#

Does it take like 0.5 GB of the installation space?

fair leaf
#

A Python install as is shouldn't take more than 200-ish MB.

wary jolt
#

This is a huge problem in that case.

#

Some people recommended installing Python 2 if such problem occurs.

proper prism
#

Fallback: use uv to install python

proper prism
wary jolt
proper prism
#

They are a package manager that allows you to install standalone python

fair leaf
wary jolt
proper prism
#

We don't know exactly the problem

#

So we cannot tell

fair leaf
#

Possibly, possibly not.

#

Though I suspect "possibly" because this looks like permissions but you can try.

proper prism
wary jolt
#

Do I need to install anything manually before the Python installation, like pip?

wary jolt
proper prism
#

No, pip is installed by python
-# * - unless you use uv python install, then yes you need to first install uv

tender sail
proper prism
wary jolt
proper prism
#

Oh well

wary jolt
#

Installing the previous version first, should I go for some other 3.13 or previous versions?

proper prism
#

Previous version

#

Other 3.13.x is still consider as 3.13

wary jolt
#

Another question, what is "WIndows embedded package" in Python installation?

proper prism
#

You shouldn't use that one

wary jolt
proper prism
#

It basically have a zip file contain python

#

But as far as I remember it have some limitations

#

Which I don't exactly remember

fair leaf
wary jolt
#

Can I rename a Python file name after the files have been installed in it?

tender sail
tender sail
wary jolt
tender sail
#

Never modify installed stuff

wary jolt
tender sail
#

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

wary jolt
#

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?

fair leaf
#

Think either should work, though you can try first with all users.

wary jolt
#

What is the possible problem with 3.13 but not 3.12?

fair leaf
#

I'm still not sure though again we know it's probably due to Revo or as a result of modifying the install improperly.

wary jolt
fair leaf
wary jolt
fair leaf
#

Alright, though the log sent says it's disabled.

wary jolt
fair leaf
wary jolt
fair leaf
wary jolt
fair leaf
#

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.

fair leaf
wary jolt
#

Will just installing the .exe work?

fair leaf
wary jolt
fair leaf
proper prism
#

That's not the file

wary jolt
#

The bot gives error.

fair leaf
#

!paste -- here are the steps for it

sharp hollowBOT
#
Pasting large amounts of code

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.

proper prism
#

You go to the website

#

You upload the file on the website
You paste
You copy the link
You paste the link here

wary jolt
fair leaf
proper prism
wary jolt
#

Is this good?

fair leaf
#

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.

wary jolt
#

Should I manually uninstall all of them?

#

@proper prism, do you have anything to say?

proper prism
#

Tekgar cover everything I would say and probably know more than me for this

wary jolt
#

Okay.

fair leaf
wary jolt
proper prism
#

It's not recommended to touch registry yourself

#

Or delete random file

wary jolt
#

So how do I make Revo list all of the remaining files?

fair leaf
wary jolt
#

If I am correct, you just mean getting the list of all the remaining Python files.

#

Am I wrong?

fair leaf
#

Otherwise we'd need to do it manually.

wary jolt
#

Would that help?

#

I am going AFK for 15 minutes.

fair leaf
fair leaf
wary jolt
fair leaf
wary jolt
fair leaf
wary jolt
#

They are not separately installed but bundled with VS Code.

fair leaf
#

For example, there's "Python 3.13.3 Standard Library (64-bit)", check if BCUninstaller lists that or something similar.

wary jolt
#

I am checking it.

wary jolt
#

What's next?

#

You there @fair leaf?

wary jolt
#

There are just some leftover files remaining.

fair leaf
#

If the uninstall was successful, then you can try installing 3.13 again.

wary jolt
#

Thanks a lot for the help.

#

Others quitted, but you remained and helped, so thanks for that.

#

Should I close it now?

fair leaf
#

If you don't have any other questions, then feel free to close it.

wary jolt
#

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?

proper prism
fair leaf
wary jolt
proper prism
#

Stuff that you won't know if you normally using Python

#

Which I don't have for example, so I just stay silent

wary jolt
fair leaf
#

As you saw here, it was mostly a matter of reading logs, searching up errors, and trying different routes to see if they work.

wary jolt
#

What CS concepts help you troubleshoot the problems?

proper prism
#

Most likely he read the source code of CPython for some part for this

fair leaf
#

(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)

wary jolt
#

I shall keep that in mind.

#

Thanks to everyone for your help.

#

!close

sharp hollowBOT
#
Python help channel closed with !close

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.