Coderunner uses old 2.71 version of Python instead of 3.2 on OSX 10.7.5

后端 未结 6 2073

I am trying to use the newer version of Python but when I type:

    import sys
    print sys.version_info

I get back:

    s         


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-05 09:34

    Crate a python file and get current sysinfo

    import sys
    print(sys.version_info)
    

    Need to change to python3?

    1. open your vscode settings file
      1.1 mac: command+shift+p
      1.2. search for openSettingsJson
    2. locate the python attribute in the json object
    3. change the value to python3
    4. validate results by running the aforementioned file
    5. profit

提交回复
热议问题