Pythonpath not updating sys path

Add the following line to ~/.bashrc, which will have the effect of changing Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. I always start with a module and turn it in to a package if needed later.keyword in Python is used to load other Python source code files in to the current interpreter session.Is there a way to tackle the problem in a more convenient way, like a command line parameter or an environment variable?

It really depends on how you want to organize your code and how large your project is.

is constructed as a concatenation of (1) the current working directory, (2) content of PYTHONPATH environment variable, and (3) a set of default paths supplied by the installed Python interpreter.

If the module you are trying to import is not found in any of the directories defined in Alternatively, you can add the custom module directory in PYTHONPATH environment variable, which will augment the default module search paths used by the Python interpreter.

I looking forward to your answers, Cheers, Heinrich.

I just ran into a situation where I compiled and installed Python 2.7.9 from source on Ubuntu, but Python could not find the packages I had previously installed.

Search for pythonpath not updating sys path:

pythonpath not updating sys path-28

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “pythonpath not updating sys path”