ImportError: cannot import name parse

weixin_33968104發表於2018-08-04

Traceback (most recent call last):
File "D:/SoftwareAndProgram/program/Python/l0x8df/ArticleSpider/spiders/jobbole.py", line 6, in <module>
from urllib import parse
ImportError: cannot import name parse
修改前:
from urllib import parse
修改後:
from urlparse import urlparse

安裝:
pip install fake_useragent
安裝:
pip install pypiwin32


報錯:
from PIL import Image
ImportError: No module named PIL
安裝:
pip install Pillow


報錯:
import MySQLdb
ImportError: No module named MySQLdb
根據自己安裝的python是多少位選擇安裝python-mysql:(64位和32如下)
http://www.codegood.com/archives/129
檢視python位數:在命令列輸入python回車後就可顯示。

9134763-c98015ff252f0063.png
image.png


報錯:
from elasticsearch_dsl import DocType, Date, Integer, Keyword, Text
ImportError: No module named elasticsearch_dsl

安裝:
pip install elasticsearch_dsl

相關文章