Unable to execute Temoa from command line
Closed this issue · 2 comments
samgdotson commented
This issue is also referenced in PR #23. I have a fresh install of Ubuntu 20.04, as well as a fresh install of Anaconda. After downloading temoa
and configuring the conda environment, I received the following error while trying to run the temoa_test_system
:
python ~/research/temoa/temoa_model/ --config=./run_BAU1.txt
Traceback (most recent call last):
File "/home/sdotson/anaconda3/envs/temoa-py3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/sdotson/anaconda3/envs/temoa-py3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/sdotson/research/temoa/temoa_model/__main__.py", line 28, in <module>
from temoa_model import *
File "/home/sdotson/research/temoa/temoa_model/temoa_model.py", line 26, in <module>
from temoa_run import *
File "/home/sdotson/research/temoa/temoa_model/temoa_run.py", line 50, in <module>
from pformat_results import pformat_results
File "/home/sdotson/research/temoa/temoa_model/pformat_results.py", line 45, in <module>
from DB_to_Excel import make_excel
ModuleNotFoundError: No module named 'DB_to_Excel'
PR #23 has several proposed solutions. I'm not sure what is causing this issue -- especially since I'm working from a brand new OS.
samgdotson commented
Update:
Strangely, the solution I had previously
sys.path.append(os.path.join(os.path.dirname(sys.path[0]), 'data_processing'))
No longer works. Additionally, the current path append
sys.path.append(os.path.join(os.getcwd(), 'data_processing'))
does not work either.
The current working solution:
sys.path.append('./data_processing')
Which was the original solution. A real head scratcher.
samgdotson commented
Further update:
Currently none of the append solutions work when I try to run Temoa from a different directory.