I attempted to follow the instructions in the document to changing the install path using the following command, but encountered an error on a Windows system.
$env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
in PowerShell 7:
ParserError:
Line |
1 | $env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy By …
| ~~~~~~~~~~
| Unexpected token 'powershell' in expression or statement.
in Windows PowerShell:
所在位置 行:1 字符: 40
+ $env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy By ...
+ ~~~~~~~~~~
表达式或语句中包含意外的标记“powershell”。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken