Python 将pyinstaller与pandas一起使用
我正在尝试将pyinstaller与pandas一起使用。我写了一个非常简单的模块: installtest.py:Python 将pyinstaller与pandas一起使用,python,windows,pandas,pyinstaller,Python,Windows,Pandas,Pyinstaller,我正在尝试将pyinstaller与pandas一起使用。我写了一个非常简单的模块: installtest.py: import pandas print 'Hello!' 然后做了: pyinstaller .\installtest.py 接下来,我按照中的说明编辑了installtest.spec,删除了build和dist目录,并在编辑的规范上再次运行pyinstaller: pyinstaller .\installtest.spec 然后,我尝试按如下方式运行生成的exe:
import pandas
print 'Hello!'
然后做了:
pyinstaller .\installtest.py
接下来,我按照中的说明编辑了installtest.spec,删除了build和dist目录,并在编辑的规范上再次运行pyinstaller:
pyinstaller .\installtest.spec
然后,我尝试按如下方式运行生成的exe:
.\dist\installtest\installtest.exe
但是,我得到以下错误:
Traceback (most recent call last):
File "installtest.py", line 1, in <module>
import pandas
File "c:\users\admini~1\appdata\local\temp\pip-build-kuazog\pyinstaller\PyInstaller\loader\pyimod03_importers.py", lin
e 389, in load_module
File "site-packages\pandas\__init__.py", line 13, in <module>
ImportError: C extension: hashtable not built. If you want to import pandas from the source directory, you may need to r
un 'python setup.py build_ext --inplace' to build the C extensions first.
Failed to execute script installtest
以下是一些系统信息:
- Python 2.7.11::Continuum Analytics,Inc
- 熊猫版本0.17.0
- pyinstaller版本3.2
- 使用Windows server 2012 R2和Powershell
我的问题:我如何才能让这个例子起作用?你解决了这个问题吗?@dylan_fan遗憾的是,我没有。由于这一点和其他困难,我最终没有使用pyinstaller,尽管我正在考虑尽快再试一次。你解决了这个问题吗?@dylan_fan不幸的是,我没有。由于这一点和其他困难,我最终没有使用pyinstaller,尽管我正在考虑不久再尝试一次。
pandas._sparse.pyd
pandas._testing.pyd
pandas.algos.pyd
pandas.hashtable.pyd
pandas.index.pyd
pandas.json.pyd
pandas.lib.pyd
pandas.msgpack._packer.pyd
pandas.msgpack._unpacker.pyd
pandas.parser.pyd
pandas.tslib.pyd