eric7/VirtualEnv/VirtualenvManager.py

branch
eric7
changeset 9016
6f079c524e99
parent 8972
54816b8f740f
child 9140
6bbb4e047902
diff -r dfeefad914ed -r 6f079c524e99 eric7/VirtualEnv/VirtualenvManager.py
--- a/eric7/VirtualEnv/VirtualenvManager.py	Sun Apr 03 17:23:31 2022 +0200
+++ b/eric7/VirtualEnv/VirtualenvManager.py	Mon Apr 04 17:43:43 2022 +0200
@@ -19,6 +19,7 @@
 from EricWidgets import EricMessageBox
 from EricWidgets.EricApplication import ericApp
 
+import Globals
 import Preferences
 
 
@@ -101,7 +102,7 @@
             del environments[venvName]
         
         # check, if the interpreter used to run eric is in the environments
-        defaultPy = sys.executable.replace("w.exe", ".exe")
+        defaultPy = Globals.getPythonExecutable()
         found = False
         for venvName in self.__virtualEnvironments:
             if (defaultPy ==
@@ -513,7 +514,10 @@
         @rtype str
         """
         if venvName in self.__virtualEnvironments:
-            return self.__virtualEnvironments[venvName]["interpreter"]
+            return (
+                self.__virtualEnvironments[venvName]["interpreter"]
+                .replace("w.exe", ".exe")
+            )
         else:
             return ""
     

eric ide

mercurial