Skip to content

Commit 315fc17

Browse files
CedricRaisonzanieb
andauthored
Update documentation for activating virtual environments in different shell (#11000)
## Add activation commands for fish shell and other alternative shells While trying to use uv with fish shell, I encountered an issue as `source .venv/bin/activate` didn't work. The documentation didn't specify that fish shell requires using `source .venv/bin/activate.fish` instead. I created issue #10986 to address this. This PR improves the documentation by: - Adding the correct activation command for fish shell: `source .venv/bin/activate.fish` - Adding the correct activation command for Nushell: `use .venv\Scripts\activate.nu` - Adding the correct activation command for Tcsh: `use .venv/bin/activate.csh` This will help users of alternative shells to properly activate their virtual environments without encountering the same confusion I experienced. Fixes #10986 --------- Co-authored-by: Zanie Blue <[email protected]>
1 parent 3c6aee3 commit 315fc17

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/pip/environments.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,30 @@ The virtual environment can be "activated" to make its packages available:
5757
$ .venv\Scripts\activate
5858
```
5959

60+
!!! note
61+
62+
The default activation script on Unix is for POSIX compliant shells like `sh`, `bash`, or `zsh`.
63+
There are additional activation scripts for common alternative shells.
64+
65+
=== "fish"
66+
67+
```console
68+
$ source .venv/bin/activate.fish
69+
```
70+
71+
=== "csh / tcsh"
72+
73+
74+
```console
75+
$ source .venv/bin/activate.csh
76+
```
77+
78+
=== "Nushell"
79+
80+
```console
81+
$ use .venv\Scripts\activate.nu
82+
```
83+
6084
## Using arbitrary Python environments
6185

6286
Since uv has no dependency on Python, it can install into virtual environments other than its own.

0 commit comments

Comments
 (0)