File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,10 +180,14 @@ def get_base_dirs():
180180 return os .environ .get ('MPLBASEDIRLIST' ).split (os .pathsep )
181181
182182 win_bases = ['win32_static' , ]
183- # on conda windows, we also add the <installdir >\Library of the local interpreter ,
183+ # on conda windows, we also add the <conda_env_dir >\Library,
184184 # as conda installs libs/includes there
185- if os .getenv ('CONDA_DEFAULT_ENV' ):
186- win_bases .append (os .path .join (os .getenv ('CONDA_DEFAULT_ENV' ), "Library" ))
185+ # env var names mess: https://github.com/conda/conda/issues/2312
186+ conda_env_path = os .getenv ('CONDA_PREFIX' ) # conda >= 4.1
187+ if not conda_env_path :
188+ conda_env_path = os .getenv ('CONDA_DEFAULT_ENV' ) # conda < 4.1
189+ if conda_env_path and os .path .isdir (conda_env_path ):
190+ win_bases .append (os .path .join (conda_env_path , "Library" ))
187191
188192 basedir_map = {
189193 'win32' : win_bases ,
You can’t perform that action at this time.
0 commit comments