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.

질문됨 2년 전554회 조회
1개 답변
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
전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠