diff --git a/setup.py b/setup.py index ff4157e..890d8e0 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,15 @@ from setuptools import setup from setuptools.extension import Extension +CONDA_PREFIX = os.environ.get("CONDA_PREFIX") +if not CONDA_PREFIX: + raise ValueError("CONDA_PREFIX not set, did you active a conda environment?") + +# gurobi seems to be putting its libraries in the top of the conda env +os.environ["PATH"] += os.pathsep + CONDA_PREFIX +print("CONDA_PREFIX:", CONDA_PREFIX) +print("PATH:", os.environ["PATH"]) + # enable test coverage tracing if CYTHON_TRACE is set to a non-zero value CYTHON_TRACE = int(os.getenv("CYTHON_TRACE") in ("1", "True"))