简体   繁体   中英

Ubuntu 16.04 issues after installing Python 3.5

I'm running Ubuntu 16.04 and installed Python 3.5 (Anaconda) and added entries to update-alternatives, so that Python 2.7 (original Ubuntu install) would still be the priority.

sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.5

But now numerous things are failing to find libraries. Programs aren't working. And Python scripts are failing.

Is there a way to revert Python settings back to original? Can I just uninstall Python 3.5?

Terminator terminal emulator even stopped working, complaining that "ubuntu-sso-login crashed with importerror in __main__: No module named 'ubuntu_sso'  

I found the solution here: https://askubuntu.com/questions/534040/dpkg-reports-problems-configuring-huge-list-of-python-related-packages-after-any/534047#534047

I thought the issue was due to which version of python was being called, but it has to do with the python-lockfile package.

The root cause of your apt problems is python-lockfile . try to reinstall it with the following commands:

 sudo apt-get clean sudo apt update sudo apt install --reinstall python-minimal python-lockfile

You could also try to manually remove python-lockfile_1%3a0.8-2ubuntu1_all.deb from the cache and retry the above commands:

 sudo rm "/var/cache/apt/archives/python-lockfile_1%3a0.8-2ubuntu1_all.deb"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM