[SciPy-User] should one put "." into PYTHONPATH

Ondrej Certik ondrej at certik.cz
Thu May 5 19:23:40 EDT 2011


Hi,

is it a good practice to have the following in .bashrc:

export PYTHONPATH=$PYTHONPATH:.

I know that Ubuntu long time ago had the "." in PYTHONPATH by default,
and then dropped it. The reason why I want it is so that I can develop
in the current directory, by doing things like:

python examples/a.py

where 'a.py' imports something from the current directory. I googled a
bit, and found that some people recommend to use "setup.py develop"
instead. I don't use setup.py in my project (I use cmake to mix
Fortran and Python together). So one option for me is to always
install it, and then import it like any other package from
examples/a.py.

I am currently undecided, so I'd be interested in any opinions on this.

Ondrej



More information about the SciPy-User mailing list