我尝试安装python包" BeautifulSoup"它给出了一条错误消息:" pkg_resources.DistributionNotFound"。在浏览stackoverflow网站后,我下载了一个python脚本并运行它:
https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py
现在,当我尝试安装sudo pip install beautifulsoup4
时,它会抛出一条新的错误消息:
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 45
def _bypass_ensure_directory(name, mode=0777):
SyntaxError: invalid token
另一件有趣的事情是,在终端中键入错误的命令,例如&#34; lss&#34;或者出现任何错误信息:
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 8, in <module>
import CommandNotFound
File "/usr/share/command-not-found/CommandNotFound/__init__.py", line 1, in <module>
from CommandNotFound import CommandNotFound
File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", line 13
except gdbm.error, err:
SyntaxError: invalid syntax
有人可以指导我如何解决这个问题吗?我的系统:
解决方案
更改了符号链接&#34; python&#34;在/ usr / bin中指向&#34; /usr/bin/python3.4" to&#34; /usr/bin/python2.7"。
其他的事情是&#34; mintMenu&#34;面板中的高级开始菜单现在再次运行。