Skip to content

Commit

Permalink
Put user provided paths at the front of sys.path instead of the back
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Clary committed Dec 22, 2021
1 parent 4627257 commit 8894da4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spyder_kernels/customize/spydercustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ def set_spyder_pythonpath():
pypath = os.environ.get('SPY_PYTHONPATH')
if pypath:
pathlist = pypath.split(os.pathsep)
sys.path.extend(pathlist)
# User provided paths should take priority
[sys.path.insert(0, p) for p in reversed(pathlist)]

set_spyder_pythonpath()

0 comments on commit 8894da4

Please sign in to comment.