Where is PYTHONPATH primarily defined?

Turning to the question here , I would like to know where Piatonpat is located, identified in the very first place. Instead of constantly adding a directory to PYTHONPATH, defining it in bashrc (local or global) or in any other way, I believe that it would be better if it were added to the source code.

+6
source share
1 answer

This is not a good idea: you will have to modify the embedded code and python libraries. I don’t even know if they were compiled, but if they weren’t, even if you could modify the code (which I don’t know, is it possible just the way we assume), you would run into a problem

  • You can ruin any other part of the code with which python will never run, and you will never know why
  • Your application will not be compatible with any other computer, since you will also have to modify the package.
  • Despite the fact that you modified the script package (so that it is compatible), or even if you just ran it on a unique machine, you may not have enough system rights to do this (in your case, I suppose you do it because I assume that you are the owner of the car, but can not)
  • Most Python implementations do not have source code available locally. All this is made up. Thus, you will need to download the source code and compile yourself, which is another problem.

I really do not recommend it, but if you still want to try it, I hope someone can answer your question better than me.

+3
source

Source: https://habr.com/ru/post/980179/


All Articles