Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnvManager updates sys.path in incorrect order #48

Open
ebenami opened this issue Dec 8, 2022 · 0 comments
Open

EnvManager updates sys.path in incorrect order #48

ebenami opened this issue Dec 8, 2022 · 0 comments

Comments

@ebenami
Copy link

ebenami commented Dec 8, 2022

If there is already a python package on the machine then it will be used instead of the package in the pex
sys.path.append(str(path_entry)) should be replaced with sys.insert(0, str(path_entry))
example:
import numpy as np
print(np.file)

output should be:
'/root/.cache/pants_jupyter_plugin/pex/venvs/af9ad1d89fc2fa245423d7cf55e8918e657a1e3b/5e00e7661f4f5acffe541d6d332efbd8d39ea6b1.pex/lib/python3.7/site-packages/numpy/init.py'
but is instead:
'/usr/local/lib/python3.7/site-packages/numpy/init.py'

ebenami pushed a commit to ebenami/pants-jupyter-plugin that referenced this issue Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant