Skip to content

Commit 8c1c9ef

Browse files
authored
fix: convert venv_prefix to str before comparison with base_prefix (#6121)
Signed-off-by: Zhenhuan Chen <[email protected]>
1 parent e821c68 commit 8c1c9ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build_wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def setup_venv(project_dir: Path, requirements_file: Path, no_venv: bool):
144144
# Ensure PyPI PyTorch is not installed in the venv
145145
purelib_dir = Path(scheme["purelib"])
146146
pytorch_package_dir = purelib_dir / "torch"
147-
if venv_prefix != sys.base_prefix and pytorch_package_dir.exists():
147+
if str(venv_prefix) != sys.base_prefix and pytorch_package_dir.exists():
148148
warnings.warn(
149149
f"Using the NVIDIA PyTorch container with PyPI distributed PyTorch may lead to compatibility issues.\n"
150150
f"If you encounter any problems, please delete the environment at `{venv_prefix}` so that "

0 commit comments

Comments
 (0)