@@ -36,6 +36,8 @@ function getSearchPaths(): string[] {
36
36
'C:\\Python3.5' ,
37
37
'C:\\Python35' ,
38
38
'C:\\Python35-32' ,
39
+ 'C:\\Anaconda' ,
40
+ 'C:\\Anaconda3' ,
39
41
'C:\\Program Files (x86)\\Python 2.7' ,
40
42
'C:\\Program Files (x86)\\Python 3.4' ,
41
43
'C:\\Program Files (x86)\\Python 3.5' ,
@@ -44,7 +46,9 @@ function getSearchPaths(): string[] {
44
46
'C:\\Program Files (x64)\\Python 3.5' ,
45
47
'C:\\Program Files\\Python 2.7' ,
46
48
'C:\\Program Files\\Python 3.4' ,
47
- 'C:\\Program Files\\Python 3.5'
49
+ 'C:\\Program Files\\Python 3.5' ,
50
+ 'C:\\Program Files\\Anaconda' ,
51
+ 'C:\\Program Files\\Anaconda3'
48
52
] ;
49
53
} else {
50
54
return [ '/usr/local/bin' , '/usr/bin' , '/bin' , '/usr/sbin' , '/sbin' ] ;
@@ -205,6 +209,9 @@ function suggestPythonPaths(): Promise<PythonPathQuickPickItem[]> {
205
209
}
206
210
207
211
function setPythonPath ( pythonPath : string , created : boolean = false ) {
212
+ if ( pythonPath . startsWith ( vscode . workspace . rootPath ) ) {
213
+ pythonPath = path . join ( '${workspaceRoot}' , path . relative ( vscode . workspace . rootPath , pythonPath ) ) ;
214
+ }
208
215
const settingsFile = workspaceSettingsPath ( ) ;
209
216
utils . validatePath ( settingsFile )
210
217
. then ( validatedPath => {
0 commit comments