安装feedparser时显示错误,求大神帮解答
F:\Python\Scripts\feedparser-5.2.1\feedparser-5.2.1>pythonsetup.pyinstallF:\Python\li...
F:\Python\Scripts\feedparser-5.2.1\feedparser-5.2.1>python setup.py install
F:\Python\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'use_2to3'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
byte-compiling F:\Python\Lib\site-packages\feedparser.py to feedparser.cpython-36.pyc
File "F:\Python\Lib\site-packages\feedparser.py", line 316
raise KeyError, "object doesn't have key 'category'"
^
SyntaxError: invalid syntax
running install_egg_info
Removing F:\Python\Lib\site-packages\feedparser-5.2.1-py3.6.egg-info
Writing F:\Python\Lib\site-packages\feedparser-5.2.1-py3.6.egg-info 展开
F:\Python\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'use_2to3'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
byte-compiling F:\Python\Lib\site-packages\feedparser.py to feedparser.cpython-36.pyc
File "F:\Python\Lib\site-packages\feedparser.py", line 316
raise KeyError, "object doesn't have key 'category'"
^
SyntaxError: invalid syntax
running install_egg_info
Removing F:\Python\Lib\site-packages\feedparser-5.2.1-py3.6.egg-info
Writing F:\Python\Lib\site-packages\feedparser-5.2.1-py3.6.egg-info 展开
1个回答
展开全部
跟你遇到一样的问题,已解决。首先安装setuptools ,然后参见网页链接,注意不用更改feedparser目录下的setup.py内容即可。setuptools参见网页链接,我是Python3.5,安装时候还会出现问题“ImportError: No module named setuptools”的错误提示,解决办法参见网页链接或者网页链接,保存一个脚本运行即可。
补充:我装好后import feedparser 失败 ,但我用的是Anaconda环境,所以打开Anaconda Prompt 输入:pip install feedparser,然后用Anaconda Prompt导入feedparser亲测成功了。
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询