Skip to content

Commit

Permalink
bf: prevent user site packages in fspython environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoopes committed Feb 19, 2021
1 parent 5d849e0 commit 18b9d49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/fspython
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# overwritten, since we don't want any user packages to interfere with things
export PYTHONPATH="${FREESURFER_HOME}/python/packages"

# futhermore, prevent local user packages from being accessed in fspython
# since we want a very isolated environment
export PYTHONNOUSERSITE=1

# run python
if [ -e "${FREESURFER_HOME}/python/bin/python3" ]; then
exec ${FREESURFER_HOME}/python/bin/python3 "$@"
Expand Down

0 comments on commit 18b9d49

Please sign in to comment.