我已经安装了带有Anaconda / ipython笔记本的python 2.7.10,现在工作正常。我的新问题是:
Ubuntu软件中心无法启动
sudo apt-get upgrade
生成以下错误。
在线建议主要是重新安装python。但是,当我尝试
时sudo apt-get install --reinstall python
我得到了
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
由于$PYTHONHOME
默认为空,我决定不管它,看看我的python安装清单。 问题:是否有可能创建别名或符号链接以使系统python再次运行而不是重新安装任何东西?再次,这里的目标只是获取apt
正确运行。感谢。
/usr/bin/python,python2,python2.7,python3,python3.4
/usr/lib/python2.7,python3,python3.4 (folders)
/usr/local/bin/python,python2,python2.7
/usr/local/lib/python2.7,python3.4 (folders)
-->
表示符号链接。
/usr/bin/python --> /usr/local/bin/python2
/usr/bin/python2 --> /usr/bin/python2.7
/usr/local/bin/python --> /usr/local/bin/python2
/usr/local/bin/python2 --> /usr/local/bin/python2.7
上面提到的错误消息:
Setting up apport (2.14.1-0ubuntu3.18) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
并针对特定应用:
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package grass-core (--configure):
subprocess installed post-installation script returned error exit status 101
Setting up python-urllib3 (1.7.1-1ubuntu4) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 289, in <module>
main()
File "/usr/bin/pycompile", line 262, in main
options.force, options.optimize, e_patterns)
File "/usr/bin/pycompile", line 178, in compile
pipe.send(fn)
File "/usr/bin/pycompile", line 141, in py_compile
stdin.write(filename + '\n')
IOError: [Errno 32] Broken pipe
dpkg: error processing package python-urllib3 (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already