@@ -575,25 +575,7 @@ func (p *Provider) DetectInstalled() ([]runtime.DetectedVersion, error) {
575575 }
576576 }
577577
578- // 2. Check common installation locations
579- locations := getPythonInstallLocations ()
580- for _ , loc := range locations {
581- if _ , err := os .Stat (loc ); err == nil {
582- if version , err := getPythonVersion (loc ); err == nil {
583- if ! seen [loc ] {
584- detected = append (detected , runtime.DetectedVersion {
585- Version : version ,
586- Path : loc ,
587- Source : "system" ,
588- Validated : true ,
589- })
590- seen [loc ] = true
591- }
592- }
593- }
594- }
595-
596- // 3. Check pyenv installations
578+ // 2. Check pyenv installations
597579 pyenvVersions := findPyenvVersions ()
598580 for _ , dv := range pyenvVersions {
599581 if ! seen [dv .Path ] {
@@ -624,49 +606,6 @@ func getPythonVersion(pythonPath string) (string, error) {
624606 return "" , fmt .Errorf ("could not parse Python version from: %s" , version )
625607}
626608
627- // getPythonInstallLocations returns common Python installation paths
628- func getPythonInstallLocations () []string {
629- home , _ := os .UserHomeDir ()
630-
631- locations := []string {
632- // Windows - check multiple Python versions
633- `C:\Python311\python.exe` ,
634- `C:\Python310\python.exe` ,
635- `C:\Python39\python.exe` ,
636- `C:\Python38\python.exe` ,
637- `C:\Python37\python.exe` ,
638-
639- // macOS (Homebrew and system)
640- "/usr/local/bin/python3" ,
641- "/opt/homebrew/bin/python3" ,
642- "/usr/bin/python3" ,
643-
644- // Linux
645- "/usr/bin/python3" ,
646- "/usr/local/bin/python3" ,
647- }
648-
649- // Windows - check LocalAppData\Programs\Python
650- if home != "" {
651- pythonLocalDir := filepath .Join (home , "AppData" , "Local" , "Programs" , "Python" )
652- if entries , err := os .ReadDir (pythonLocalDir ); err == nil {
653- for _ , entry := range entries {
654- if entry .IsDir () {
655- pythonExe := filepath .Join (pythonLocalDir , entry .Name (), "python.exe" )
656- locations = append (locations , pythonExe )
657- }
658- }
659- }
660-
661- // macOS/Linux user installs
662- locations = append (locations ,
663- filepath .Join (home , ".local" , "bin" , "python3" ),
664- )
665- }
666-
667- return locations
668- }
669-
670609// findPyenvVersions scans pyenv directory for installed versions
671610func findPyenvVersions () []runtime.DetectedVersion {
672611 detected := make ([]runtime.DetectedVersion , 0 )
0 commit comments