iT邦幫忙

0

Pyinstaller含有pandas就失敗

Komo 2021-10-25 13:13:432259 瀏覽
  • 分享至 

  • xImage

在將python打包的過程中,同一個.py檔,在沒有import pandas時是可以成功打包的。但是只要import pandas後再打包就會出現 「tuple index out of range」,請問這種情況怎麼辦?

Pyinstaller是在github下載的,python版本3.10

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

2
hokou
iT邦好手 1 級 ‧ 2021-10-25 13:56:25

python 降版本或是改 spec 檔呢?

github 是有看到支援 3.10,不過 pip 那邊還是 3.9,可能還有一些不穩定
其他的都是改 spec

參考資料
PyInstaller and Pandas
PyInstaller with Pandas — Problems, solutions, and workflow with code examples
Python Pyinstaller打包含pandas库的py文件遇到的坑
pyinstaller 将.py生成.exe ----报错 “IndexError: tuple index out of range”

Komo iT邦新手 5 級 ‧ 2021-11-11 00:17:49 檢舉

謝謝回答!最後是選擇降版本,謝謝你!

arguskao iT邦新手 4 級 ‧ 2023-09-04 21:40:51 檢舉

請問降版本以後就正常了嗎

我要發表回答

立即登入回答