为什么ia Pyinstaller不使用Pycharm



我用Kivyin Pycharm构建了乒乓游戏,并希望将其导出为.exe单机版。我尝试了Pyinstaller,结果是:

41727警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\pywin32_system32\pywintypes39.dll的python39.dll依赖项42028警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\pywin32_system32\pythoncom39.dll的python39.dll依赖项42081警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_decimal的python39.dll依赖项.pyd42128警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs\select.p的python39.dll依赖项yd42181警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_overlap的python39.dll依赖项ped.pyd42244警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_queue.p的python39.dll依赖项yd42297警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_ctypes的python39.dll依赖项。pyd42360警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_multipr的python39.dll依赖项processing.pyd42382警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs\pyexpat的python39.dll依赖项。pyd42445警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs\unicoded的python39.dll依赖项ata.pyd42482警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_asyncio的python39.dll依赖项.pyd42544警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_hashlib的python39.dll依赖项.pyd42598警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_lzma.py的python39.dll依赖项d42645警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_bz2.pyd 的python39.dll依赖项

42714警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_socket的python39.dll依赖项。pyd42799警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_ssl.pyd 的python39.dll依赖项

42845警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32\win32trace.pyd的python39.dll依赖项42983警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\Pythonwin\win32ui.pyd的python39.dll依赖项43146警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32_win32sysloader.pyd的python39.dll依赖项43300警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32\win32api.pyd的python39.dll依赖项43362警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\DLLs_uuid.py的python39.dll依赖项d43431警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32comext\shell\shell.pyd的python39.dll依赖项43516警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl_backend\cgl.gl的python39.dll依赖项39-win_amd64.pyd43547警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl_backend\cgl/debug的python39.dll依赖项.cp39-win_amd64.pyd43585警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\audio_sdl2.cp39-win的python39.dll依赖项amd64.pyd43685警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\text_text_sdl2.cp39 winamd64.pyd的python39.dll依赖项43748警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\instructions.cp39-win的python39.dll依赖项_amd64.pyd43786警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\lib\ gstplayer_gstplayer.cp39的python39.dll依赖项-win_amd64.pyd43848警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy_event.cp39-win_amd64.pyd的python39.dll依赖项43886警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\shader.cp39-win_amd64的python39.dll依赖项.pyd43933警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\buffer.cp39-win_amd64的python39.dll依赖项.pyd43986警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\weakproxy.cp39-win_amd64.pyd的python39.dll依赖项44033警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\tesselator.cp39-win_a的python39.dll依赖项md64.pyd44049警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\transformation.cp39-w的python39.dll依赖项in_amd64.pyd44086警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\vertex.cp39-win_amd64的python39.dll依赖项.pyd44133警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\gl_instructions.cp39的python39.dll依赖项-win_amd64.pyd44165警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\vbo.cp39-win_amd64.py的python39.dll依赖项d44218警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\context.cp39-win_amd6的python39.dll依赖项4.pyd44265警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\text_layout.cp39-win的python39.dll依赖项_amd64.pyd44303警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl_backend\cgl_glew的python39.dll依赖项。cp39-win_amd64.pyd44350警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\opengl_utils.cp39-win的python39.dll依赖项amd64.pyd44465警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\vertex_instructions.c的python39.dll依赖项p39-win_amd64.pyd44503警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\fbo.cp39-win_amd64.py的python39.dll依赖项d44566警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\Windows\window_info.cp39-w的python39.dll依赖项in_amd64.pyd44619警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32\win32file.pyd的python39.dll依赖项44836警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\stencil_instructions的python39.dll依赖项。cp39-win_amd64.pyd44867警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\compiler.cp39-win_amd的python39.dll依赖项64.pyd44905警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\texture.cp39-win_amd6的python39.dll依赖项4.pyd44952警告:找不到lib:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p0\DLLs_element的python39.dll依赖项树.pyd45005警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\context_ainstructions的python39.dll依赖项。cp39-win_amd64.pyd45036警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\opengl.cp39-win_amd64的python39.dll依赖项.pyd45068警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl.cp39-win_amd64.py的python39.dll依赖项d45105警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl_backend\cgl_sdl2的python39.dll依赖项。cp39-win_amd64.pyd45152警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\剪刀_指令的python39.dll依赖项。cp39-win_amd64.pyd45190警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\svg.cp39-win_amd64.py的python39.dll依赖项d45221警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\clipboard_clipboard_sdl2的python39.dll依赖项.cp39-win_amd64.pyd45253警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\window_window_sdl2.cp39的python39.dll依赖项-win_amd64.pyd45306警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\core\image_img_sdl2.cp39 winamd64.pyd的python39.dll依赖项45353警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\win32\win32gui.pyd的python39.dll依赖项45406警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\graphics\cgl_backend\cgl_mock的python39.dll依赖项。cp39-win_amd64.pyd45437警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy_clock.cp39-win_amd64.pyd的python39.dll依赖项45469警告:找不到lib:c:\users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\kivy\properties.cp39-win_amd64.pyd的python39.dll依赖项46594信息:寻找鸡蛋46594信息:Python库不在二进制依赖项中。正在进行其他搜索。。。46594警告:无法获取文件C:\Users\Utilizador\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kra8p0\py的二进制依赖项thon.exe46594警告:原因:"文件为空"追踪(最近一次通话):46594警告:stderr:Tracyback(最近一次调用最后一次):文件";C: \Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\lib\runpy.py",第197行,在_run_module_as_main中46594警告:stderr:File"C: \Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\lib\runpy.py",运行模块中的第197行as_mainreturnrun_code(code,main_globals,None,46594警告:stderr:returnrun_code(code,main_globals,None,文件";C: \Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\lib\runpy.py",第87行,在运行代码中46594警告:stderr:File"C: \Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kra8p\lib\runpy.py",第87行,在运行代码中exec(代码,run_globals)46594警告:stderr:exec(代码,run_globals)文件";C: \Users\Utilizador\PycharmProjects\pythonProject\pyinstaller.exe_main.py";,第7行,在46594警告:stderr:File"C: \Users\Utilizador\PycharmProjects\pythonProject\pyinstaller.exe_main.py";,第7行,在文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller_main.py";,线路114,运行中46594警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller_main.py";,线路114,运行中run_build(pyy_config、spec_file、**vars(args))46594警告:stderr:run_build(pyy_config、spec_file、**vars(args))文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller_main.py";,第65行,在run_build中46594警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller_main.py";,第65行,在run_build中PyInstaller.building.build_main.main(pyy_config,spec_file,**kwargs)46594警告:stderr:PyInstaller.building.build_main.main(pyy_config、spec_file、**kwargs)文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,725号线,主线路46594警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,725号线,主线路build(specfile,kw.get('distpath'),kw.get-('workpath')46594警告:stderr:build(specfile,kw.get('distpath'),kw.get('workpath'),kw.got('clean_build'))文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,672线,在建46610警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,672线,在建exec(代码,spec_name空间)46610警告:stderr:exec(代码,spec_name空间)文件";C: \Users\Utilizador\PycharmProjects\pythonProject\main.spec";,第6行,在46610警告:stderr:File"C: \Users\Utilizador\PycharmProjects\pythonProject\main.spec";,第6行,在a=分析(['main.py'],46610警告:stderr:a=分析(['main.py'],文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,第242行,在init46610中警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,第242行,在initself中位置()46610警告:stderr:self位置()文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller\building\datastruct.py";,第160行,在postinit46610中警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site-packages\PyInstaller\building\datastruct.py";,第160行,位于_位置_self.assembly()46610警告:stderr:self.assembly()文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,476行,装配中46610警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,476行,装配中自我_check_python_library(self.binary)46610警告:stderr:self_check_python_library(self.binary)文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,第569行,在_check_python_library中46610警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\building\build_main.py";,第569行,在_check_pyth中_库python_lib=bindependen.get_python_library_path()46610警告:stderr:python_lib=bindepend.get_python_library_path()文件";c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\dependent\bindependent.py",第956行,在get_python_library_path中46610警告:stderr:File"c: \users\utilizador\pycharmprojects\pythonproject\venv\lib\site packages\PyInstaller\dependent\bindependent.py",第956行,在get_python_lib中rary_path引发IOError(消息)46610警告:stderr:引发IOError(消息)OSError:找不到Python库:libpython39m.dll、libpython2.9.dll、libpython3.9m.dll、python39.dll、libpython 39.dll46610警告:stderr:OSError:找不到Python库:libpython39m.dll、libpython 3.9.dll、libpython3.9m.dll、python39.dll、libpython 39.dll这意味着您的Python安装没有附带适当的库文件。46625警告:stderr:这意味着您的Python安装没有正确的库文件。这种情况通常是由于缺少开发包,或者Python安装的构建参数不合适。46625警告:stderr:这通常是由于缺少开发包或Python安装的构建参数不合适而导致的。

46625警告:stderr:*在Debian/Uubuntu上,您需要安装Python开发包46625警告:stderr:*在Debian/Uubuntu上,您需要安装Python开发包*apt-get-install python3dev46625警告:stderr:*apt-get-install python3 dev*apt-get-install-python-dev46625警告:stderr:*apt-get-install-python-dev*如果您自己构建Python,请使用--enable-shared(或Darwin上的--enable-framework)重建您的Python46625警告:stderr:*如果您自己构建Python,请使用--enable-shared(或Darwin上的--enable-framework)重建您的Python

46625警告:stderr:

这种情况不断出现。我在Pycharm中尝试了很多不同的代码和项目,但它始终不起作用。我尝试过不同的版本和不同的命令,但最终都是一样的。

我得到了"dist"文件夹,但它是空的,总是空的。这是我的代码:

from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import (
NumericProperty, ReferenceListProperty, ObjectProperty
)
from kivy.vector import Vector
from kivy.clock import Clock
class PongPaddle(Widget):
score = NumericProperty(0)
def bounce_ball(self, ball):
if self.collide_widget(ball):
vx, vy = ball.velocity
offset = (ball.center_y - self.center_y) / (self.height / 2)
bounced = Vector(-1 * vx, vy)
vel = bounced * 1.1
ball.velocity = vel.x, vel.y + offset

class PongBall(Widget):
velocity_x = NumericProperty(0)
velocity_y = NumericProperty(0)
velocity = ReferenceListProperty(velocity_x, velocity_y)
def move(self):
self.pos = Vector(*self.velocity) + self.pos
class PongGame(Widget):
ball = ObjectProperty(None)
player1 = ObjectProperty(None)
player2 = ObjectProperty(None)
def serve_ball(self, vel=(4, 0)):
self.ball.center = self.center
self.ball.velocity = vel
def update(self, dt):
self.ball.move()
# bounce of paddles
self.player1.bounce_ball(self.ball)
self.player2.bounce_ball(self.ball)
# bounce ball off bottom or top
if (self.ball.y < self.y) or (self.ball.top > self.top):
self.ball.velocity_y *= -1
# went of to a side to score point?
if self.ball.x < self.x:
self.player2.score += 1
self.serve_ball(vel=(4, 0))
if self.ball.x > self.width:
self.player1.score += 1
self.serve_ball(vel=(-4, 0))
def on_touch_move(self, touch):
if touch.x < self.width / 3:
self.player1.center_y = touch.y
if touch.x > self.width - self.width / 3:
self.player2.center_y = touch.y
class PongApp(App):
def build(self):
game = PongGame()
game.serve_ball()
Clock.schedule_interval(game.update, 1.0 / 60.0)
return game
if __name__ == '__main__':
PongApp().run()

谢谢。

打开cmd并执行:cd(python文件所在的目录)示例:cd桌面

然后执行pyinstaller--一个文件名.py

相关内容

  • 没有找到相关文章

最新更新