Windows 中的 python“未知选项:-e”消息 [已关闭]

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

我在 Windows 机器上安装了 python,并将 python 目录添加到了

PATH
变量中。

python
关键字似乎在cmd.exe中被识别,但是当我想执行某些操作时,我只收到消息:

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 pip
1个回答
2
投票

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

--version

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

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

python -m pip install pyinstaller

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