Skip to content

Commit

Permalink
uv install
Browse files Browse the repository at this point in the history
  • Loading branch information
stevhliu authored Jan 21, 2025
1 parent fb91fd3 commit 460b3cf
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,47 @@ 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
```

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

0 comments on commit 460b3cf

Please sign in to comment.