用 python3.6 制作了个爬虫。在 pycham 里能正常运行,用了 requests,beautifulsoup,pandas,json,re,datetime 等第三方库
但是 pyinstaller 打包完成没什么问题,运行 exe 程序就出现了错误:
源码地址:
https://gitee.com/rufengkj/zwu_educational_system/blob/master/sina%E6%96%B0%E6%B5%AA%E6%96%B0%E9%97%BB/Sina_News.pyraceback (most recent call last ):
File site-packages\pandas\ init. py, line 26, in <module)
File c: users hugang \appdata\local \programs \python \ python36\lib\site-packages Py Installer(loader \py imod03 importers
line 631. in exec module
exec(bytecode, module. dict
filesite-packages\pandas libs init. py, line 4, in <module>
File"c: \users hugang appdata local \programs \python python 36\lib\site-packages\Py Installer\loader \pyimod03 importers
line 714. in load module
module= loader load module(fullname)
File pandas libs\tslib pyx, line 1, in init pandas. libs tslib
lodulenotfounderror: No module named pandas. libs. tslibs timedeltas
During handling of the above exception, another exception occurred
raceback (most recent call last)
File Sina News. py, line 8, in <module)
File c: users hugang \appdata local programs \python \python36lib\site-packages\ Py Installer(loader pyimod03 importers
line 631, in exec module
exec(bytecode, module. dict
File site-packages \pandas init. py, line 35, in <module)
mporterror: C extension: No module named pandas. libs. tslibs timedeltas “ not built. If you want to import pandas from
he source directory, you may need to run python setup. py build ext --inplace--force “ to build the C extensions first
5636 Failed to execute script Sina News
OCR 识别的截图,略有缺省,见谅!
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://tanronggui.xyz/t/438991
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.