Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] uv install #7376

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,50 @@ You should install 🤗 Datasets in a [virtual environment](https://docs.python.
cd ~/my-project
```

2. Start a virtual environment inside your directory:
2. Start a virtual environment inside your directory. You can use python or [uv](https://docs.astral.sh/uv/) (refer to [Installation](https://docs.astral.sh/uv/getting-started/installation/) for installation instructions), a fast Rust-based Python package and project manager.

<hfoptions id="install">
<hfoption id="uv">

```bash
python -m venv .env
uv venv my-env
source my-env/bin/activate
```

3. Activate and deactivate the virtual environment with the following commands:
</hfoption>
<hfoption id="python">

```bash
# Activate the virtual environment
source .env/bin/activate

# Deactivate the virtual environment
source .env/bin/deactivate
python -m venv .env
source ./env/bin/activate
```

</hfoption>
</hfoptions>

Once you've created your virtual environment, you can install 🤗 Datasets in it.

## pip

The most straightforward way to install 🤗 Datasets is with pip:
The most straightforward way to install 🤗 Datasets is with pip or uv.

<hfoptions id="pip">
<hfoption id="uv">

```bash
uv pip install datasets
```

</hfoption>
<hfoption id="pip">

```bash
pip install datasets
```

</hfoption>
</hfoptions>

Run the following command to check if 🤗 Datasets has been properly installed:

```bash
Expand Down
Loading