I Broke Python: What Can I Do? [Closed]

I have a big problem on my Ubuntu 64 bits...

I tried to clean a python test I made when I had compiled a modified python version. But I think I broke everything :s

now, when I launch cmd "python3", I have:

>python3
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted

I can't "apt-get install python3.3" and I can't remove it...

I tried:

apt-get clean
apt-get autoclean
apt-get update
apt-get upgrade

nothing

I don't no what I can do now...

EDIT: I think too much is broken. Luckily, I backed up my VM a week ago. So I restored it as before.

Next time that I would like to reinstall a package properly, I will use "sudo apt-get install - reinstall python3". (thanks)

However I think we can't uninstall python3 when it is compiled at home ().... "make: *** No rule to make target `uninstall'. Stop." :)

thank you all !

3

Reinstall python:

sudo apt-get install --reinstall python3
2

Maybe you could try an apt-get remove python-3.3, then apt-get clean, apt-get update, and then apt-get install python-3.3 ?

1

If you just need it to work and don't care about the old setup you could download python and compile it in some specific location and just run it from there. See:

1
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest