Discuss / Python / 我这里出错了

我这里出错了

Topic source

FJ-W97

#1 Created at ... [Delete] [Delete and Lock User]

print('100 + 200 =', 100 + 200) 结果竟然是这样的: ('100 + 200 =', 300)

FJ-W97

#2 Created at ... [Delete] [Delete and Lock User]

自己找了下,原来是自己的linux装了python2和python3,改一下vscode的python路径就好了

生菜sure

#3 Created at ... [Delete] [Delete and Lock User]

请问windows上出现这情况是?

是python版本不同的问题,和操作系统没关系

怎么改vscode的python路径啊,我用的Mac,已经下载python3了啊?

windows 出现这种情况也是多版本的原因, 找到 3.x 版本的 python.exe 改成 python3.exe 执行的时候用 python3 hello.py
或者找到 2.x 版本的 python.exe 改成 python2.exe 这样 python 默认执行的就是 3.x 的版本

李翔龙2010

#7 Created at ... [Delete] [Delete and Lock User]

MAC自动获取的只要你下了就能在pycharm里找到


  • 1

Reply