diff -r dfeefad914ed -r 6f079c524e99 eric7/VirtualEnv/VirtualenvAddEditDialog.py --- a/eric7/VirtualEnv/VirtualenvAddEditDialog.py Sun Apr 03 17:23:31 2022 +0200 +++ b/eric7/VirtualEnv/VirtualenvAddEditDialog.py Mon Apr 04 17:43:43 2022 +0200 @@ -8,7 +8,6 @@ """ import os -import sys from PyQt6.QtCore import pyqtSlot, Qt from PyQt6.QtWidgets import QDialog, QDialogButtonBox @@ -17,6 +16,7 @@ from .Ui_VirtualenvAddEditDialog import Ui_VirtualenvAddEditDialog +import Globals import Utilities @@ -77,7 +77,7 @@ self.pythonExecPicker.setWindowTitle( self.tr("Python Interpreter")) self.pythonExecPicker.setDefaultDirectory( - sys.executable.replace("w.exe", ".exe")) + Globals.getPythonExecutable()) self.execPathEdit.setToolTip(self.tr( "Enter the executable search path to be prepended to the PATH" @@ -192,7 +192,7 @@ self.pythonExecPicker.setDefaultDirectory(txt) else: self.pythonExecPicker.setDefaultDirectory( - sys.executable.replace("w.exe", ".exe")) + Globals.getPythonExecutable()) py = self.__detectPythonInterpreter(txt) if py: self.pythonExecPicker.setText(py)