Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio未更改为正确的python版本_Python_Visual Studio_Interpreter - Fatal编程技术网

Visual studio未更改为正确的python版本

Visual studio未更改为正确的python版本,python,visual-studio,interpreter,Python,Visual Studio,Interpreter,我正在尝试将VisualStudio代码上的python版本从2.7.10更改为python 3.8.1 如果我点击python解释器,它会说我正在使用python 3.8 然后,如果我在终端中检查版本,它也会显示 为了首先更改Python解释器,我更改了JSON设置文件 "python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8"

我正在尝试将VisualStudio代码上的python版本从2.7.10更改为python 3.8.1

如果我点击python解释器,它会说我正在使用python 3.8

然后,如果我在终端中检查版本,它也会显示

为了首先更改Python解释器,我更改了JSON设置文件

    "python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8"
然后我在终端中运行了这些命令,因为在此之后,终端仍然在2.7.10上运行

echo$SHELL
echo$PATH

alias python=/Library/Frameworks/python.framework/Versions/3.8/bin/python3.8
尝试使用
python3
命令而不是
python
所以而不是

python test.py
是吗

python3 test.py
(假设您从终端手动运行python文件)