简体   繁体   English

我安装了 Python 3 x64、Python 2.7 x64 和 Python 2.7 x32。 如何使用 py 启动器切换到 Python 2.7 的 32 位版本?

[英]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

My Issue我的问题

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.

相关问题 为x32和x64位系统安装了Python 2.7时,如何修复环境变量? - How can you fix the environment variables when having Python 2.7 installed for both a x32 and x64 bit system? pip如何在Windows 7 x64和python 2.7上安装pylzma - How pip install pylzma on windows 7 x64 , python 2.7 我应该在Windows 7上使用Python 2.7 32位或64位 - Should I use Python 2.7 32 bit or 64 bit with Windows 7 需要帮助来解决Anaconda Python 2.7 x32的问题 - Need help to resolve issue with Anaconda Python 2.7 x32 尝试使用python 2.7.8在x32上运行x64机器的代码 - trying to run code for x64 machine on x32 with python 2.7.8 如何在Mac上从64位python 2.7切换到32位python 2.7 - how to switch from 64 bit python 2.7 to 32 bit python 2.7 on mac 如何在 Windows 上制作单文件可执行文件 python 2.7 x64? - How to make a single-file executable python 2.7 x64 on windows? 我应该为安装在Intel 64位上的python 2.7 32bit下载哪个pythonwin - which pythonwin should I download for python 2.7 32bit installed on Intel 64 bit 为什么Python 2.7符号扩展了x64上从GetDC()返回的HDC? - Why does Python 2.7 sign extend HDC returned from GetDC() on x64? Python 2.7在$ LD_LIBRARY_PATH(OpenSUSE 12.1 x64)中不查找.so库 - Python 2.7 doesn't look for .so libs in $LD_LIBRARY_PATH (OpenSUSE 12.1 x64)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM