Can I specify the python version?

0

Can I, in the command line, switch the python version 'on the fly'? Or specify the path to the interpreter. unlinking and linking python versions could break other things. If I "ln -s python3.6 /usr/bin/python" it works. if it is "ln -s python2 /usr/bin/python" it don't work.

asked 2 years ago530 views
1 Answer
0

If you have a Python file (say utility.py) you can run it from the command line by specifying which Python interpreter: python3.6 utility.py or python3 utility.py.

profile pictureAWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions