diff --git a/spyder/plugins/ipythonconsole/utils/kernelspec.py b/spyder/plugins/ipythonconsole/utils/kernelspec.py index 5141015bfd6..a3588255539 100644 --- a/spyder/plugins/ipythonconsole/utils/kernelspec.py +++ b/spyder/plugins/ipythonconsole/utils/kernelspec.py @@ -12,7 +12,6 @@ import logging import os import os.path as osp -import sys # Third party imports from jupyter_client.kernelspec import KernelSpec @@ -32,13 +31,6 @@ logger = logging.getLogger(__name__) -def is_different_interpreter(pyexec): - """Check that pyexec is a different interpreter from sys.executable.""" - executable_validation = osp.basename(pyexec).startswith('python') - directory_validation = osp.dirname(pyexec) != osp.dirname(sys.executable) - return directory_validation and executable_validation - - def get_activation_script(quote=False): """ Return path for bash/batch conda activation script to run spyder-kernels. @@ -92,11 +84,8 @@ def argv(self): self.set_conf('default', True, section='main_interpreter') self.set_conf('custom', False, section='main_interpreter') - # Part of spyder-ide/spyder#11819 - is_different = is_different_interpreter(pyexec) - # Command used to start kernels - if is_different and is_conda_env(pyexec=pyexec): + if is_conda_env(pyexec=pyexec): # If this is a conda environment we need to call an intermediate # activation script to correctly activate the spyder-kernel