Environment variables (Environment setup)


I am currently running Python scripts on my server, and I’ve encountered a problem with setting up the environment variables.

I have successfully installed certain packages (such as ClearSilver, and SQLite and pysqlite, etc.) … but while these work from python when I’m SSH’ing into the server, the packages are not found when I run my script in a browser.

I have of course modified ~/.bash_rc and ~/.bashprofile as instructed just about everywhere on the Wiki.

The script has been tested locally, so it is not the problem.

I have solved this problem by running the locally installed version of python which is ~/bin, and now everything runs well.

However, I’ve realized that the environment variables that my scripts get when they are called by suexec are useless:


As you can see, the PATH does not contain my home directory, and so applications like LaTeX have no chance whatsoever to find locally installed packages.

This is a big, big problem, and I’m unsure how to proceed. Am I doing the environment setup wrong?

How does it work with Trac? Is that because I’m using CGI, and the Trac installs use FastCGI?