简体   繁体   English

Python - 无法安装 pyinstaller

[英]Python - Can't install pyinstaller

I'm using Windows 10.我正在使用 Windows 10。

In my project folder, I'm trying to test it as an exe.在我的项目文件夹中,我正在尝试将其作为 exe 进行测试。

So, I did this to install Pyinstaller: py -m pip install pyinstaller所以,我这样做是为了安装 Pyinstaller: py -m pip install pyinstaller

And it said it installed.它说它已安装。 But when I did py -m pyinstaller emu.py , it just returned this:但是当我py -m pyinstaller emu.py ,它只是返回了这个:

C:\Users\tux\AppData\Local\Programs\Python\Python310\python.exe: No module named pyinstaller

Can someone help?有人可以帮忙吗? If I try to install pyinstaller using PIP again, it comes up with this error:如果我尝试再次使用 PIP 安装 pyinstaller,则会出现以下错误:

Requirement already satisfied: pyinstaller in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (5.3)
Requirement already satisfied: pyinstaller-hooks-contrib>=2021.4 in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pyinstaller) (2022.8)
Requirement already satisfied: altgraph in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pyinstaller) (0.17.2)
Requirement already satisfied: pefile>=2022.5.30 in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pyinstaller) (2022.5.30)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: setuptools in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pyinstaller) (58.1.0)
Requirement already satisfied: future in c:\users\tux\appdata\local\programs\python\python310\lib\site-packages (from pefile>=2022.5.30->pyinstaller) (0.18.2)

It's saying Pyinstaller is already installed, but python doesn't recognise it.就是说 Pyinstaller 已经安装了,但是 python 不识别它。

Before you ask, if I try to just run pyinstaller as a standalone command, it says it cannot find pyinstaller.在你问之前,如果我尝试将 pyinstaller 作为独立命令运行,它会说它找不到 pyinstaller。

Edit: It's been over a month and nobody has replied.编辑:已经一个多月了,没有人回复。 Forget it.忘了它。 I'm just not gonna make the application.我只是不会申请。

Did you try the generic way你试过通用的方法吗

pip install pyinstaller

also refer to this pypi link https://pypi.org/project/pyinstaller/也可以参考这个pypi链接https://pypi.org/project/pyinstaller/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM