在我写的时候
python --version
在命令提示符下,我什么也得不到。我应该得到python的版本详细信息,对吗?如何纠正它?
pip也是一样的,下载哪个文件以及如何安装,.whl还是.grz?本指南展示了使用pip --version的方法,该版本最初在cmd中也不起作用。
发布于 2020-06-18 14:17:43
你没有说你的问题是如何解决的,所以我不得不自己想办法。我的问题是WindowsApps文件夹中有一个0kb的Python.exe,它位于PATH环境变量中。我只是删除了那个文件,一切都正常了。
发布于 2020-09-30 20:51:23
也有同样的问题。我通过将python.exe目录添加到环境变量修复了这个问题
Open System Properties (Right click Computer in the start menu, or use the keyboard shortcut Win+Pause)
Click Advanced system settings in the sidebar.
Click Environment Variables...
Select PATH in the System variables section
Click Edit
Add Python's path to the end of the list (the paths are separated by semicolons). For example:
C:\Windows;C:\Windows\System32;C:\Python27
发布于 2021-03-23 18:31:56
我发现在终端中输入python --version
也不起作用,但我发现输入py --version
确实起到了作用。
https://stackoverflow.com/questions/58918911
复制相似问题