0

configure my script to point to Python 3

I wrote my script in an IDE, but I'm not sure how to configure it to point to Python 3 instead of the older version?

19th Oct 2019, 11:03 PM
David
David - avatar
4 odpowiedzi
+ 2
If you have python 3 already installed, and it works fine in terminal, then you can simply add this line to the top of your code: #! /usr/bin/python3 The path may be different for you, so change it if it's different. This line tells the computer to use the source in the path to run the file.
20th Oct 2019, 2:21 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
Aymane Boukrouh It worked. Appreciate the help.
20th Oct 2019, 2:31 AM
David
David - avatar
0
What operating system are you using ?
19th Oct 2019, 11:06 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
Aymane Boukrouh Im using a MacOs
20th Oct 2019, 2:15 AM
David
David - avatar