ImportError:C扩展:如果我运行使用PyInstaller

时间:2018-03-13 02:41:36

标签: python pandas pyinstaller

我写了一些使用pandas的代码。当我从命令提示符执行它时它工作正常。但是,当我将其作为.exe文件并尝试从命令提示符运行时,它会收到如下错误:

Traceback (most recent call last):
  File "Result_generator.py", line 2, in <module>
  File "c:\users\akhil\appdata\local\temp\pip-build-rccgn1\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
  File "result_test.py", line 3, in <module>
  File "c:\users\akhil\appdata\local\temp\pip-build-rccgn1\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
  File "site-packages\pandas\__init__.py", line 35, in <module>
ImportError: C extension: No module named tslib not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
[12340] Failed to execute script Result_generator

我也安装了tslib包。但没有用。我在做什么错了?请帮我解决一下这个。在此先感谢。

怀疑:在错误声明中,它说运行&#34; python setup.py ...&#34;命令。但我在pandas目录中找不到任何setup.py文件。解决方案是什么?

0 个答案:

没有答案