File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,9 @@ def _setup(self):
136
136
conda_args = [util .replace_python_version (arg , self ._python ) for arg in conda_args ]
137
137
138
138
if not self ._conda_environment_file :
139
- conda_args = ['wheel' , 'pip' ] + conda_args
139
+ # With a user-provided envronment, we assume it specifies a python version;
140
+ # without an environment.yml file, we need to add the python version ourselves
141
+ conda_args = [f'python={ self ._python } ' , 'wheel' , 'pip' ] + conda_args
140
142
141
143
# Create a temporary environment.yml file
142
144
# and use that to generate the env for benchmarking.
Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ def _setup(self):
138
138
env .update (self .build_env_vars )
139
139
Path (f"{ self ._path } /conda-meta" ).mkdir (parents = True , exist_ok = True )
140
140
if not self ._mamba_environment_file :
141
- # Construct payload
142
- mamba_pkgs = ["wheel" , "pip" ]
141
+ # Construct payload; since there is no environment.yml file, we need to add the python version ourselves
142
+ mamba_pkgs = [f"python= { self . _python } " , "wheel" , "pip" ]
143
143
else :
144
144
# For named environments
145
145
env_file_name = self ._mamba_environment_file
You can’t perform that action at this time.
0 commit comments