python request is not defined_python引入requests模块报错
import requests模塊總是報錯,求助大神
>>> import requests
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 68, in
_attach_namespace(urllib3, 'requests.packages')
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 61, in _attach_namespace
package.__name__ + '.'):
File "/usr/lib/python2.7/pkgutil.py", line 105, in walk_packages
for importer, name, ispkg in iter_modules(path, prefix):
File "/usr/lib/python2.7/pkgutil.py", line 147, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "/usr/lib/python2.7/pkgutil.py", line 196, in iter_modules
import inspect
File "/usr/lib/python2.7/inspect.py", line 39, in
import tokenize
File "/usr/lib/python2.7/tokenize.py", line 39, in
COMMENT = N_TOKENS
NameError: name 'N_TOKENS' is not defined
在其他系統上都不存在這樣的問題, 求助各位!!
總結
以上是生活随笔為你收集整理的python request is not defined_python引入requests模块报错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 单个正态总体均值的区间估计_假设检验09
- 下一篇: python编辑用户登录界面_pytho