简体   繁体   English

Python命令提示

[英]Python Command Prompt

I have both python 3 as well as python 2 version installed in my Windows PC. 我在Windows PC中同时安装了python 3和python 2版本。 On calling variable name 'py' in cmd, python2.7 shows up even though I have mentioned python34 folder path in local environment PATH values. 在cmd中调用变量名“ py”时,即使我在本地环境PATH值中提到了python34文件夹路径,也会显示python2.7。 Please recommend a fix. 请推荐一个修复程序。

You can resolve this by setting the environment variable 您可以通过设置环境变量来解决此问题

SET PY_PYTHON=3

or by editing the py.ini in your applications data folder and adding the following line: 或在应用程序数据文件夹中编辑py.ini并添加以下行:

[defaults]
python=3

Typically, your application directory is found in C:\\Documents and Settings\\[username]\\Application Data or C:\\Users\\[username]\\AppData\\Local\\ depending on the Windows version. 通常,根据Windows版本,您的应用程序目录位于C:\\Documents and Settings\\[username]\\Application DataC:\\Users\\[username]\\AppData\\Local\\

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

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