I have downloaded and installed the development version of Numpy from Github and at first this module is imported with a standard import. Somewhere along the line (package manager updates or other python package installs from git sources I suspect) Python imports revert to the Numpy module installed by the package manager.
How do I get Python to import the modules I have installed from git sources?
I would like to avoid having to modify the sys.path in every script.
I run Ubuntu Gnome 14.10.
The path is as follows:
>>> import sys
Recommended way is off course, using VirtualEnv. But as a suggestion, you can add the git numpy source to the pythonpath manually, before working on that module.
$ export PYTHONPATH=$PYTHONPATH:/YOUR/REPO/LOCATION
I used to do this before I learnt of virtualenvs ;)
As suggested in comments above, it is highly recommended to use virtualenv module, because when you will have more that 1 project you will face the problem that different projects require different modules or different versions of one module.
Imagine you have 200 projects and each of them require some modules to work. If you decide to share one of your project with anybody it will be a nightmare to determine which dependencies has this exact project and what modules are required for it to work.
So please check virtualenv and also virtualenvwrapper which makes work with virtualenv very comfortable.
Both modules available for
pip install, they are not complex, you will get hands on them very quick. Time spent to study them worth of benefit you will get.