Welp. I'm halfway through the third day of trying to fix my python installation.

Reply to this note

Please Login to reply.

Discussion

Oh dear, what did you do? πŸ«‚

Yuck.

sssss it on ssstrike? =)

Usually helps to force-reinstall the packages off your package manager to reset them to what they were supposed to be (i.e. apk fix on Alpine, apt reinstall on Debian and friends).

However, if you are on windows... you're boned. =) Delete and retry. Python management on Windows is non-existent.

I'm trying pyenv. But now pyenv is acting up.

I usually just install a flat python3 and python3-venv. From there, I just use `python3 -m venv` to create workspaces and then do things there. Not the greatest, but so far the most stable solution.

I use it on my RISC-V board to run Home Assistant. x)

Maybe I need to delete the venv.

pyenv doesn't work, either. I'm ready to throw the entire laptop out of the window.

The problem is that I installed python from source, instead of downloading as a package, and it didn't contain sqlite3. So I installed that and now it's like, too late, had to be installed first. But if I try to uninstall python and reinstall, it's like OMG DON'T DO THAT.

For some weird reason, my computer only had python2 installed. And the venv was giving me errors, for some reason. So, I installed python3 and now it's like a never-ending nightmare I can't escape from.

Ready to format C and be done with it. LOL

Sometimes it’s just best to do that. Scorched earth.

Gotta agree with Lee. rip though :/

You could try to force load order in $PATH (or %PATH% in windows, methinks) but yeah, it sounds like some stuff got tangled pretty "neatly"...

Also, depending on what you are doing, something I have found myself do a lot as of late is to just:

$ docker run -v $PWD:$PWD alpine:3.19 sh -c "cd $PWD; sh -i"

A little bit unwieldy, but it just puts you into a clean environment. Then you can just:

$ apk add -U python3 py3-sqlite

and now you can hack away. =) There's probably a better container for python specifically, but aside from the container image, the rest is universal. It helps to isolate away sometimes. Doesn't help for fixed installs though...

You could also try to use a portable python install, change 4path in that session to reference that path before any other and see if that does anything?

Other than that, i have no idea. x)

Husband came home and discovered that the package manager is also shot and the permissions are shot and the stick I've been booting from contained an old version. So reformatting.

I'm relieved, to be honest.

I wonder if it might be a bit faster, now. πŸ€”

Yall pythonistas have it worse than us C++ guys sounds like.

There are too many versions installed and I can't delete any without breaking Mint.

Have you worked with anaconda/mamba?

no

if you wanna give it a shot

https://github.com/conda-forge/miniforge

Mamba's usage is essentially anaconda's but use mamba because it deals with dependencies way faster.

https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

When you activate an environment you can either use the anaconda (conda install ...) repository or regular pip. Generally use the anaconda versions when you can because it solves the dependancies but both are fine.

Whole computer is shot. 😭

Installing python is a pain. Anaconda is the best bet IMO. Just leave the system's python alone, use virtual env for everything

The system had no python3. That should have been my first clue that the OS was corrupted. πŸ˜‚

It all works smoothly now and the whole thing is faster.

oh, yeah, no reason to use v2 ever again afaik

Thank you for reminding me to be grateful for rustup and cargo.