[英]Traceback error in terminal when trying to use python
I am getting this error whenever I try to use terminal. 每当我尝试使用终端时,我都会收到此错误。 I was initially trying to use pip to install html5lib, but now I can't even use python. 我最初尝试使用pip安装html5lib,但现在我什至不能使用python。 Anyone have any idea what is going on? 有人知道发生了什么吗?
Dans-MacBook-Pro:~ DanLee$ python
Traceback (most recent call last):
File "/Users/DanLee/anaconda/lib/python2.7/site.py", line 62, in <module>
import os
File "/Users/DanLee/anaconda/lib/python2.7/os.py", line 49, in <module>
import posixpath as path
File "/Users/DanLee/anaconda/lib/python2.7/posixpath.py", line 450, in <module>
plt.plot(years,gdp, color = 'green', marker = 'o', linestyle = 'solid')
NameError: name 'plt' is not defined
Dans-MacBook-Pro:~ DanLee$ pip install html5lib
Traceback (most recent call last):
File "/Users/DanLee/anaconda/lib/python2.7/site.py", line 62, in <module>
import os
File "/Users/DanLee/anaconda/lib/python2.7/os.py", line 49, in <module>
import posixpath as path
File "/Users/DanLee/anaconda/lib/python2.7/posixpath.py", line 450, in <module>
plt.plot(years,gdp, color = 'green', marker = 'o', linestyle = 'solid')
NameError: name 'plt' is not defined
Summarizing comments here: 在此处总结评论:
You've installed Anaconda, so use conda
to install packages: 您已经安装了Anaconda,因此请使用conda
安装软件包:
conda install html5lib
Of course, it seems you've somehow messed up your Anaconda install, so re-install it first. 当然,您似乎已经以某种方式搞砸了Anaconda的安装,因此请先重新安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.