Skip to content

Commit 277f611

Browse files
tusharbana-ansyspre-commit-ci[bot]RobPasMue
authored
Uv bugfix (#470)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent 1eca988 commit 277f611

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ansys/tools/installer/windows_functions.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,16 @@ def create_venv_windows(venv_dir: str, py_path: str):
6060
# Create venv using uv
6161
LOG.debug("Creating virtual environment using uv...")
6262
subprocess.call(
63-
f'start /w /min cmd /K ""{py_path}\\python.exe" -m uv venv {venv_dir} && exit"',
63+
f'start /w /min cmd /K ""{py_path}\\python.exe" -m uv venv --seed {venv_dir} && exit"',
64+
shell=True,
65+
cwd=user_profile,
66+
)
67+
68+
# Check & Update default venv packages
69+
LOG.debug("Updating virtual environment packages...")
70+
venv_python = os.path.join(venv_dir, "Scripts", "python.exe")
71+
subprocess.call(
72+
f'start /w /min cmd /K "{venv_python} -m pip install --upgrade pip uv && exit"',
6473
shell=True,
6574
cwd=user_profile,
6675
)

0 commit comments

Comments
 (0)