File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,14 @@ def get_base_dirs():
180
180
return os .environ .get ('MPLBASEDIRLIST' ).split (os .pathsep )
181
181
182
182
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,
184
184
# 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" ))
187
191
188
192
basedir_map = {
189
193
'win32' : win_bases ,
You can’t perform that action at this time.
0 commit comments