Skip to content

Commit

Permalink
Fix virtualenv python interpreter used (#98)
Browse files Browse the repository at this point in the history
* Add virtualenv version logging
* Force using requested python interpreter
  • Loading branch information
idantene authored Feb 27, 2022
1 parent 92b5ce6 commit e3e6a1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clearml_agent/helper/package/pip_api/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_flags(self):
return Argv.conditional_flag(
self.session.config["agent.package_manager.system_site_packages"],
"--system-site-packages",
)
) + ("--python", self._bin)

def install_flags(self):
"""
Expand All @@ -64,6 +64,10 @@ def create(self):
Only valid if instantiated with path.
Use self.python as self.bin does not exist.
"""
# Log virtualenv information to stdout
self.session.command(
self.python, "-m", "virtualenv", "--version"
)
self.session.command(
self.python, "-m", "virtualenv", self.path, *self.create_flags()
).check_call()
Expand Down

0 comments on commit e3e6a1d

Please sign in to comment.