importError c extension: No module named np_datetine not buit
我的python代码中有import pandas
使用pyinstaller进行打包exe的时候出现以下问题,现在就来说一下。
打包的时候没有报错,
但是执行时候首先报了pandas的错。提示没有找到pandas._lilbs.tslibs.np_datetime。大概的错误如下:
第一个错误是:
Fi1e sitepackagesp\pandas\init .py 1ine 35 in Kmodule?
importError c extension: No module named np_datetine not buit. Jf you yant to import pandas from. the source drectory
g you may need to run python setup. py buildext inplace force to bui1d the c extensions first:
iFai1ed to execute script smg
通过网上查找的方法,修改下pyinstaller的用法,生成过程中添加--hiddenimport=pandas._libs.tslibs.np_datetime,代码如下
pyinstaller -F -w smg.py --hiddenimport=pandas._libs.tslibs.np_datetime
继续打包,过程中没有报错,继续执行exe文件的时候报错如下
第二个错误:
Fi1e sitepackagesp\pandas\init .py 1ine 35 in Kmodule?
Fi1e sitepackagesp\pandas\init .py 1ine 35 in Kmodule?
importError c extension: No module named timedeltas not buit. Jf you yant to import pandas from. the source drectory
g you may need to run python setup. py buildext inplace force to bui1d the c extensions first:
iFai1ed to execute script smg
iFai1ed to execute script smg热门日志
分类
- Django(4)
- ssdb(1)
- Mac(7)
- C(1)
- memcache(1)
- Python(32)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- about(1)
- git(9)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(2)
- 架构(18)
- Vue(1)
- game(2)
- Html(6)
- Java(8)
- Mysql(37)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(72)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Php(102)
- Windows(8)
- Message(48)
- Lua(10)
- Compute(1)
- Redis(7)
- Nginx(12)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)