Pythonpath not updating sys path pregnancy due date based on ultrasound dating

If you have not modified this list already, it will probably contain your working directory and nothing else.

At the bottom of this window, there is an icon for “Add Path”. Now you can find the directory you want to add, as if you were opening a file. Once you have selected a directory, it will become a permanent addition to Python’s paths within Spyder.

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.

This naturally raises the question - how does Python know where to find packages when you call ?

Logical and neat directory structure will make your own, your computer's and your collaborators' lives much easier.

My recommendation: Create a master code directory (called "Modules" or something) in your Documents folder.

Among common Python exceptions, the most infamous and time consuming one to solve is no doubt the “Module Not Found Error” but actually is pretty simple to fix once you understand a couple of concepts.

Fundamentally it can be raised for three reasons: This is the most easy to spot, and if you are using an IDE like Py Charm you will notice it immediately before running your code.

In most cases it happens after an automatic refactoring with Py Charm (typically if you use the logging framework in the classical way)*, if it happens for other reasons it’s a signal that your software design is not sound and that you must review it carefully.

This post applies specifically to Python 2.7.9, but I'm guessing Python 3x works very similarly.

In this post I first describe how Python finds packages, and then I'll finish with the discovery I made regarding the default Python that ships with Ubuntu and how it differs from vanilla Python in how it finds packages.

If you are using the Spyder IDE, you can permanently add a directory to its collection of paths.

Chose the “PYTHONPATH manager” from the menu ( This will open a window that shows a list of directories added to Spyder’s collection of paths.

Leave a Reply

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

One thought on “pythonpath not updating sys path”