![](/img/trans.png)
[英]Python can't open a file in C:\Windows\System32\oobe\Info\backgrounds
[英]Cannot open self C:\Windows\system32\file.exe or archive C:\Windows\system32\file.pkg
我尝试使用pyinstaller将* .py转换为* .exe并将它们放在system32中,以使它们成为cmd命令,但是我总是收到错误消息:
Cannot open self C:\WINDOWS\system32\file.exe or archive
C:\WINDOWS\system32\file.pkg
我尝试重新安装pyinstaller和Python,并尝试了不同的命令和代码,但没有任何效果。
我制作了一个虚拟文件来检查我的代码是否有问题
print("test")
但这也不起作用。 我通常使用的命令是
pyinstaller --onefile file.py
效果很好,但是如果我尝试将其用作命令,则无法将其作为文件而不是命令打开
我希望我可以键入file
并执行,但是现在我必须做
cd C:\Users\user\Downloads\file.exe
file.exe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.