Skip to content

The command to changing the install path in the document does not work on Windows #9503

@A-kirami

Description

@A-kirami

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions