我在 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.
错在哪里?
对于第一个错误,请尝试使用
--version
。
-version
相当于 -v -e -r -s -i -o -n
。
关于第二个错误,很难确定,但你可以尝试从 python 运行 pip:
python -m pip install pyinstaller