简体   繁体   中英

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. 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:

conda install html5lib

Of course, it seems you've somehow messed up your Anaconda install, so re-install it first.

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