allow python path to be modified with an environment variable
See original GitHub issueObserved behavior
Currently there is no way to use external settings files or install additional kolibri plugins with a PEX files.
Expected behavior
We can add support for a new environment variable, e.g. KOLIBRI_ADDITIONAL_PY
. When set, this value will be prepended to the internal python path, allowing additional packages to be referenced by the PEX.
User-facing consequences
Without this, have to choose between being able to use external packages or having a portable, downloadable executable.
Context
0.11.x
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to modify windows 10 path variable directly from a python ...
The idea is that you can call the setx command from python and use it to update the path variable. You should be...
Read more >How to add Python Path to Windows 10 PATH - Liquid Web
Method 2 · Step 1. Open an administrative command prompt by going to · Step 2. Once the Type in the python command,...
Read more >4. Using Python on Windows — Python 3.11.1 documentation
To permanently modify the default environment variables, click Start and search for 'edit environment variables', or open System properties, Advanced system ...
Read more >How to Add Python Installation to Path Environment variable ...
In this tutorial you will learn How to Add Python Installation to Path Environment variable in Windows 10.When we install we have an...
Read more >How to add Python to PATH variable in Windows - Educative.io
PATH variable · Right-clicking This PC and going to Properties. · Clicking on the Advanced system settings in the menu on the left....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was resolved during investigation of using the Sentry SDK in https://github.com/learningequality/kolibri/pull/5773
The key here was to set the environment variable
PEX_INHERIT_PATH=1
: https://pex.readthedocs.io/en/stable/api/index.html#pex.variables.Variables.PEX_INHERIT_PATHThis lets the pex inherit the Python path of the active Python environment.
setting the variable
PEX_INHERIT_PATH=1
is necessary for any situation where a user has installed using thepex
and tries to enable an external plugin.We don’t publicly document plugin enable/disable functionality because it’s not stable yet, but when we do we’ll need to add this as a note. Opened a tracker issue here: https://github.com/learningequality/kolibri-docs/issues/149