File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,19 @@ def julia_py_executable():
162162
163163 # try to find installed julia-py script - check scripts folders under different installation schemes
164164 # we check the alternate schemes first, at most one of which should give us a julia-py script
165+ # if the environment variable `PYTHONPATH` is set, we additionally check whether the script is there
165166 # if no candidate in an alternate scheme, try the standard install location
166167 # see https://docs.python.org/3/install/index.html#alternate-installation
167168 scripts_paths = [
168- sysconfig .get_path ("scripts" , scheme ) for scheme in sysconfig .get_scheme_names ()
169+ * [
170+ sysconfig .get_path ("scripts" , scheme )
171+ for scheme in sysconfig .get_scheme_names ()
172+ ],
173+ * [
174+ os .path .join (pypath , "bin" )
175+ for pypath in os .environ .get ("PYTHONPATH" , "" ).split (os .pathsep )
176+ if pypath
177+ ],
169178 ]
170179 scripts_paths .append (sysconfig .get_path ("scripts" ))
171180
You can’t perform that action at this time.
0 commit comments