diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 193540a01..3f77267d9 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -164,7 +164,10 @@ def link_pyqt(): if not os.path.exists(source): raise FileNotFoundError(source) if os.path.exists(dest): - os.unlink(dest) + if os.path.isdir(dest): + shutil.rmtree(dest) + else: + os.unlink(dest) if os.name == 'nt': if os.path.isdir(source): shutil.copytree(source, dest, ignore=get_ignored_files,