[英]I have Python 3 x64, Python 2.7 x64, and Python 2.7 x32 installed. How can I use py launcher to switch to the 32 bit version of Python 2.7?
I've installed Python in the following locations:我在以下位置安装了 Python:
C:\Python\Python27
C:\Python\Python27x86
C:\Python\Python310
Here are the current version strings for each install:以下是每次安装的当前版本字符串:
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:19:08) [MSC v.1500 32 bit (Intel)] on win32
Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] on win32
When I enter py -2.7
I get the 64 bit environment of Python2.7.当我输入py -2.7
时,我得到了 Python2.7 的 64 位环境。 I want to be able to also switch to the 32 bit version of Python 2.7 using py
.我还希望能够使用py
切换到 Python 2.7 的 32 位版本。 How can I do this?我怎样才能做到这一点?
Any help is greatly appreciated.任何帮助是极大的赞赏。
Use py -2.7-32
.使用py -2.7-32
。 See Customizing default Python versions :请参阅自定义默认 Python 版本:
In some cases, a version qualifier can be included in a command to dictate which version of Python will be used by the command.在某些情况下,可以在命令中包含版本限定符来指示该命令将使用哪个 Python 版本。 A version qualifier starts with a major version number and can optionally be followed by a period ('.') and a minor version specifier.版本限定符以主要版本号开头,可以选择后跟句点 ('.') 和次要版本说明符。 Furthermore it is possible to specify if a 32 or 64 bit implementation shall be requested by adding “-32” or “-64”.此外,可以通过添加“-32”或“-64”来指定是否应请求 32 位或 64 位实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.