无法在Windows上使用python(未知选项:-e)

问题描述 投票:0回答:1

我尝试在 Windows 计算机上安装 python 以运行 python 脚本并使用 pip install 安装软件包。我安装了 python 并将 python 文件夹添加到 PATH 变量 cmd 似乎也识别关键字 python,但是当我想执行某些操作时,我只收到消息:

cmd:
C:\Users\user>python -version
Unknown option: -e
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

当我尝试使用

pip install pyinstaller
安装 pyinstaller 时 我收到错误消息:

The command ‘pip’ is either misspelled or
could not be found.

我的安装错误在哪里?

python windows cmd
1个回答
0
投票

对于第一个错误,请尝试使用

--version

-version
相当于
-v -e -r -s -i -o -n

关于第二个错误,很难确定,但你可以尝试从 python 运行 pip:

python -m pip install pyinstaller

© www.soinside.com 2019 - 2024. All rights reserved.