Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否使用pyinstaller在windows中创建python exe?_Python_Python 3.x_Windows_Pip_Pyinstaller - Fatal编程技术网

是否使用pyinstaller在windows中创建python exe?

是否使用pyinstaller在windows中创建python exe?,python,python-3.x,windows,pip,pyinstaller,Python,Python 3.x,Windows,Pip,Pyinstaller,我试图从我创建的python脚本中创建一个可执行文件,但我被卡住了 我按照不同的教程安装了适用于windows和pyinstaller的Python3.9 x64,但对我来说没有任何效果。最初的教程是这样的(我也跟着其他类似的人): 接下来,当我试图用命令创建.exe时:pyinstaller name\u archive.py 我得到了下一个错误: 'pyinstaller' is not recognized as an internal or external command, oper

我试图从我创建的python脚本中创建一个可执行文件,但我被卡住了

我按照不同的教程安装了适用于windows和pyinstaller的Python3.9 x64,但对我来说没有任何效果。最初的教程是这样的(我也跟着其他类似的人):

接下来,当我试图用命令创建.exe时:
pyinstaller name\u archive.py
我得到了下一个错误:

'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
对于这个问题,我在这里找到了一些解决方案:

我在环境变量、路径、用户变量和系统变量中添加了下一个目录:

C:\Users\User\AppData\Roaming\Python\Python39\Scripts


现在,在cmd中再次运行命令:
pyinstaller name\u archive.py
,并使用存档路径(
C:\Users\User\Desktop\K1>pyinstaller name\u arhive.py
)会出现以下错误:

Fatal error in launcher: Unable to create process using '"c:\program files\python39\python.exe"  "C:\Users\User\AppData\Roaming\Python\Python39\Scripts\pyinstaller.exe" name_archive.py': The system can't find the specified file
我在网上广泛地寻找这个问题,但我找不到任何有用的信息,甚至在pyinstaller网站上。。。()


请帮帮我,我在过去的四个小时里什么都试过了,结果一无所获。。。lol

尝试使用文件的完整路径运行命令。>pyinstaller C:/full/path/to/name_archive.pyNow,在cmd中再次运行命令:pyinstaller name_archive.py,并使用存档路径(C:\Users\User\Desktop\K1>pyinstaller name_arhive.py)会出现以下错误:“启动程序中出现致命错误:无法使用”“C:\program files\python39\python.exe”“创建进程”“C:\Users\User\AppData\Roaming\Python39\Scripts\pyinstaller.exe“name\u archive.py”:系统找不到指定的文件“您能在此处发布完整命令吗?”?