用 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.py
raceback (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 识别的截图,略有缺省,见谅!