程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

The python version of vscode terminal in liunx system does not correspond to the python version of xshell terminal

編輯:Python
The phenomenon and background of the problem

I have a problem recently :vscode Upper terminal python Version and xshell On the terminal python Version does not correspond to .

Wrong content

I'm going to use vscode Connect to the server remotely to debug the code , When the terminal enters the virtual environment, it is found that python yes Linux default python edition (2.7), instead of anaconda Of python edition ( It's been installed before anaconda). Enter the command which python It also shows liunx default python route .

At this point I use xshell Connect to server , Enter the command which python It is shown that anaconda Of python route , Enter the command python It also shows anaconda default python edition (3.7.6).

Next, I go to a section called tracking Virtual environment for (python Version is 3.6.2) in , Find out vscode On the terminal python Also still linux default python(2.7)

And in the xshell Entry in terminal tracking The virtual environment shows python Version is normal

My solution ideas and tried methods

Later I saw such a link on the Internet https://blog.csdn.net/weixin_43659913/article/details/103830210. This link applies to Macos System , Not applicable to liunx System . Later I copied this link , stay setting.json The following statement is added to the file :

"terminal.integrated.env.linux": {
 "PATH": "" }

The result did not solve the problem

What I want to achieve

Personally, I think there is no problem on the server side , Otherwise, use xshell Terminal displayed python The version is also wrong . Should be vscode Set up questions , But I have no idea how to change myself .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved