0

I first downloaded python x64. Now, I have both python x64 and python x32. How can I create a python file for just the x32, and not the x64?

Edit: I thought this was a duplicate, but it was not, the other answer does not have a response that works.

Tsarquiem
  • 9
  • 2

2 Answers2

1

You can detect current python is 32-bit or 64-bit.

import platform
print(platform.architecture()[0])

You can then write code accordingly ...

Nawal
  • 321
  • 3
  • 7
1

Python is an interpreted language, so Python files can always run in both 32-bit and 64-bit environments, with the same behaviour and output (in most cases).

If you want to control which Python instance your code runs with, you should start the program by giving the direct path to the version of Python which you intend to run.

Miguel Guthridge
  • 1,444
  • 10
  • 27