-2

I accidently deleted all python2.7 python3 python 3.5 and python3.6 in usr/local/lib and in usr/lib i'm really new to the UNIX environment so I have no idea what I just did but I can't use python anymore ... any help?

Spir Zi
  • 21
  • 3
  • 3
    Install fresh if you have not messed up the OS already. But you probably do. Because python 2.7 and python3.5 is heavily integrated with the OS. here is a url to install python3.5: https://stackoverflow.com/a/38393177/6029175 and install python2.7: https://askubuntu.com/a/981279 [ IN FUTURE: DONT REMOVE BUILT IN PYTHON LIBRARIES. IT WILL SCREW UP YOUR SYSTEM ] – O_o May 24 '18 at 09:02
  • Being new to UNIX can do that sometimes :) Don't be afraid to reinstall the entire system if necessary, that's how you learn what not to do in the future. – Ofer Sadan May 24 '18 at 09:10

1 Answers1

0

A straight forward approach might be to remove and reinstall python.

For example reinstalling python3

sudo apt-get remove python3
sudo apt-get install python3

Adapted from the following SO answer: https://stackoverflow.com/a/42044572/1844376

Another approach could be:

sudo apt-get install --reinstall python

Adapted from: https://askubuntu.com/a/448927/665609

ScottMcC
  • 4,094
  • 1
  • 27
  • 35