I am trying to configure an external / lib program written in python - on debian squeeze.
The error that I get when I try to run it so that the "environment variable is not set" is the exception that the developer throws. Therefore, I think I should define it, but where?
- I thought virtualenv and path were the same, so I wrote pth loaded at startup. He solved the error, but not all.
- I read the use of export in
~/.bashrc , but I'm not sure if it is readable in virtualenv, and I do not want this export to be read even if I do not use this virtualenv. - I also read to use export in
virtualenv/bin/activate , but it does not work correctly.
I am trying to install Opus and Urbansim .
Here is what I get on startup:
(opus-env) touki@touki :~/Projects/opus-env$ ./src/opus_gui/opus.py Traceback (most recent call last): File "./src/opus_gui/opus.py", line 14, in <module> from opus_gui.main.controllers.opus_gui_configuration import OpusGuiConfiguration File "/home/touki/Projects/opus-test/src/opus_gui/main/controllers/opus_gui_configuration.py", line 12, in <module> from opus_core import paths File "/home/touki/Projects/opus-test/src/opus_core/paths.py", line 44, in <module> OPUS_HOME = _safe_getenv('OPUS_HOME', _get_default_opus_home) File "/home/touki/Projects/opus-test/src/opus_core/paths.py", line 33, in _safe_getenv return os.environ[key] if key in os.environ else default_func() File "/home/touki/Projects/opus-test/src/opus_core/paths.py", line 36, in _get_default_opus_home raise Exception('OPUS_HOME environment variable must be set.') Exception: OPUS_HOME environment variable must be set.
NB: I was looking for autoenv to combine virtualenvwrapper seems to give an answer, but I would rather not use external programs.
Touki source share