12
12
import logging
13
13
import os
14
14
import os .path as osp
15
- import sys
16
15
17
16
# Third party imports
18
17
from jupyter_client .kernelspec import KernelSpec
56
55
"</pre>" )
57
56
58
57
59
- def is_different_interpreter (pyexec ):
60
- """Check that pyexec is a different interpreter from sys.executable."""
61
- # Paths may be symlinks
62
- real_pyexe = osp .realpath (pyexec )
63
- real_sys_exe = osp .realpath (sys .executable )
64
- executable_validation = osp .basename (real_pyexe ).startswith ('python' )
65
- directory_validation = osp .dirname (real_pyexe ) != osp .dirname (real_sys_exe )
66
- return directory_validation and executable_validation
67
-
68
-
69
58
def has_spyder_kernels (pyexec ):
70
59
"""Check if env has spyder kernels."""
71
60
if is_module_installed (
@@ -127,9 +116,6 @@ def argv(self):
127
116
self .set_conf ('default' , True , section = 'main_interpreter' )
128
117
self .set_conf ('custom' , False , section = 'main_interpreter' )
129
118
130
- # Part of spyder-ide/spyder#11819
131
- is_different = is_different_interpreter (pyexec )
132
-
133
119
# Command used to start kernels
134
120
kernel_cmd = [
135
121
pyexec ,
@@ -140,7 +126,7 @@ def argv(self):
140
126
'-f' , '{connection_file}'
141
127
]
142
128
143
- if is_different and is_conda_env (pyexec = pyexec ):
129
+ if is_conda_env (pyexec = pyexec ):
144
130
# If executable is a conda environment and different from Spyder's
145
131
# runtime environment, we need to activate the environment to run
146
132
# spyder-kernels
0 commit comments