日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python.exe在哪个文件_pythonexe文件中的images文件夹放在哪里?

發布時間:2025/3/19 python 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python.exe在哪个文件_pythonexe文件中的images文件夹放在哪里? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我已經把我設計的python游戲轉換成了一個exe。運行exe本身會導致它閃爍然后關閉,這意味著發生了錯誤。從命令提示符運行它也會導致錯誤,但會記錄它:Cannot load image: Playfield.png

Couldn't open images\Playfield.png

這說明load_image塊失敗了。我以前沒有images目錄時遇到過這種情況。在

我試圖將images文件夾移到dist目錄。這是顯示的錯誤:

^{pr2}$

這是我第一次使用py2exe,所以我不太確定發生了什么。原始python文件本身,表_戰爭.py,按預期運行。在

如果有幫助的話,整個Table_Wars文件夾的位置在我的桌面上的一個名為Games的文件夾中(C:\Users\Oventoaster\Desktop\Games\Table_Wars)。我運行的是Windows7 32位操作系統。在

如有要求,這是輸出.txt我產生了:Folder PATH listing for volume OS

Volume serial number is 7659-4C9C

C:\USERS\OVENTOASTER\DESKTOP\GAMES\TABLE_WARS

build

bdist.win32

winexe

bundle-2.7

collect-2.7

ctypes

distutils

email

mime

encodings

logging

multiprocessing

dummy

pygame

threads

unittest

xml

parsers

temp

dist

images

這是設置.py我曾經轉換文件:from distutils.core import setup

import py2exe

setup(console=['Table_Wars.py'])

編輯:我嘗試使用完整的py2exe示例。這將創建exe,但給出相同的Cannot load image錯誤。試圖將images文件夾與exe放在同一個文件夾中會創建一個Runtime Error: The application requested the runtime to terminate it in an unusual way.

Slace Diamond建議的代碼縮寫形式阻止了py2exe找到Table_Wars.py:

從命令:running py2exe

*** searching for required modules ***

error: Table_Wars.py: No such file or directory.

setup和{}在同一目錄中。如果有幫助,我輸入完整的路徑python.exe以及設置.py. 在

編輯:我好像越來越近了。我把images目錄放在self.extra_datas中,現在我得到了:

Fatal Python error: (segmentation fault)This application has requested the runtime to terminate it in an unusual way. Please contact the application's suppourt team for more information

總結

以上是生活随笔為你收集整理的python.exe在哪个文件_pythonexe文件中的images文件夹放在哪里?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。