0

I have two python scripts and one of them runs on python 3.8.6 64bit and the other runs on python 3.8.6 32bit version. I have been trying to run them using different python version using shebang but it does not seem to work.

I'm currently using Visual Studio Code and even though I put shebang code like this #!"C:/Python/3.8.6/64/python.exe"

it does not change the python version the script is running Is there a way to make python code to run at specific version?

  • similar question answered here : [Answer](https://stackoverflow.com/questions/7237415/python-2-instead-of-python-3-as-the-temporary-default-python) – Bullet Dec 27 '20 at 07:31

2 Answers2

0

If you're using visual studio code, use ctrl + shift + p and choose specific interpreter for your code to run.

Other option is to make a virtualenv with the python version you need and run it your code there.

Hossein Heydari
  • 1,439
  • 9
  • 28
0

Press CTRL + SHIFT + P and search for open user settings In there search for this setting: Python: python interpreter Then you can change the path of your python interpreter

Matan Boas
  • 16
  • 3