Skip to content

Commit 4c235f1

Browse files
authored
support newer venv and virtualenv
since real_prefix is no longer set
1 parent c5c07ec commit 4c235f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cogs/plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def load_plugin(self, plugin):
187187
if req_txt.exists():
188188
# Install PIP requirements
189189

190-
venv = hasattr(sys, "real_prefix") # in a virtual env
190+
venv = hasattr(sys, "real_prefix") or hasattr(sys, "base_prefix") # in a virtual env
191191
user_install = " --user" if not venv else ""
192192
proc = await asyncio.create_subprocess_shell(
193193
f"{sys.executable} -m pip install --upgrade{user_install} -r {req_txt} -q -q",

0 commit comments

Comments
 (0)