diff --git a/build.sh b/build.sh index aa4d4a7..dbd3838 100755 --- a/build.sh +++ b/build.sh @@ -60,9 +60,9 @@ function install_libraries() if [[ $ECE_VERBOSE == 0 ]]; then echo ... Installing libraries from conda-forge ...; fi if [[ "$OSOPTION" = "--windows" ]]; then - local COMMAND=`echo conda install -c conda-forge pyomo ipopt glpk` + local COMMAND=`echo conda install -c conda-forge pyomo ipopt glpk pyutilib numpy-financial` else - local COMMAND=`echo conda install -c conda-forge pyomo ipopt coincbc glpk` + local COMMAND=`echo conda install -c conda-forge pyomo ipopt coincbc glpk pyutilib numpy-financial` fi if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge command: ${COMMAND}; fi ${COMMAND} @@ -79,9 +79,9 @@ function create_libraries() if [[ $ECE_VERBOSE == 0 ]]; then echo ... Installing libraries from conda-forge ...; fi if [[ "$OSOPTION" = "--windows" ]]; then - local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt glpk` + local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt glpk pyutilib numpy-financial` else - local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt coincbc glpk` + local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt coincbc glpk pyutilib numpy-financial` fi if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge command: ${COMMAND}; fi ${COMMAND} diff --git a/src/logos_main.py b/src/logos_main.py index 20a7371..5956d40 100644 --- a/src/logos_main.py +++ b/src/logos_main.py @@ -15,12 +15,12 @@ #Internal Modules------------------------------------------------------------------------------------ # Add contrib to the sys path -from _utils import getPluginLoc -pluginLoc = getPluginLoc(plugin='LOGOS') -if any(os.path.normcase(sp) == os.path.join(pluginLoc, 'src', 'contrib') for sp in sys.path): - print(f'WARNING: "{os.path.join(pluginLoc, "src", "contrib")}" already in system path. Skipping setup') +pyspLoc = os.path.abspath(os.path.join(os.path.dirname(__file__), 'contrib')) +if any(os.path.normcase(sp) == pyspLoc for sp in sys.path): + print(f'WARNING: "{pyspLoc}" already in system path. Skipping setup') else: - sys.path.append(os.path.join(pluginLoc, 'src', 'contrib')) + sys.path.append(pyspLoc) + #import PyomoModels from CapitalInvestments import PyomoModels from CapitalInvestments.investment_utils import inputReader