File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change
1
+ Allow creating the virtual environments with `venv ` as a fallback if `virtualenv ` is not available.
Original file line number Diff line number Diff line change @@ -151,12 +151,17 @@ def _create_virtualenv(self):
151
151
self .ctx .debug ("Virtual environment path already exists" )
152
152
return
153
153
virtualenv = shutil .which ("virtualenv" )
154
- if not virtualenv :
155
- raise FileNotFoundError ("'virtualenv' binary not found" )
156
- cmd = [
157
- virtualenv ,
158
- f"--python={ self .get_real_python ()} " ,
159
- ]
154
+ if virtualenv :
155
+ cmd = [
156
+ virtualenv ,
157
+ f"--python={ self .get_real_python ()} " ,
158
+ ]
159
+ else :
160
+ cmd = [
161
+ self .get_real_python (),
162
+ "-m" ,
163
+ "venv" ,
164
+ ]
160
165
if self .system_site_packages :
161
166
cmd .append ("--system-site-packages" )
162
167
cmd .append (str (self .venv_dir ))
You can’t perform that action at this time.
0 commit comments