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

Nfiann-prerelease #6502

Open
wants to merge 17 commits into
base: current
Choose a base branch
from
Open
Changes from 4 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
68 changes: 68 additions & 0 deletions website/docs/docs/core/pip-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,71 @@ python -m pip install \
```

Or, better yet, just install the package(s) you need!

<VersionBlock firstVersion="1.8">
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved

### Install prereleases of dbt adapters

To install prerelease versions of dbt Core and your adapter, use this command:

```shell
python3 -m pip install --pre dbt-core dbt-adapter-name
````
We recommend you install prereleases in a [virtual Python environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/). You can run the commands to activate and install your virtual environment. You’ll need to activate your virtual environment before you start installing or using packages within it. For example, to install a prerelease in a `POSIX bash`/`zsh` virtual Python environment, use the following command:
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved

```shell
dbt --version
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --pre dbt-core dbt-adaptername
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved
source venv/bin/activate
dbt --version
```

nataliefiann marked this conversation as resolved.
Show resolved Hide resolved
#### Install prereleases on different operating systems

To install or use packages within your virtual environment:

- Activate the virtual environment to add its specific Python and `pip` executables to your shell’s PATH. This ensures you use the environment’s isolated setup. You can run the following commands to activate your virtual environment.
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved

- Select your operating system to activate your virtual environment.
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved

<Expandable alt_header="Unix/macOS" >
nataliefiann marked this conversation as resolved.
Show resolved Hide resolved

```shell
source .venv/bin/activate
which python
.venv/bin/python
```

These commands will install the prerelease:

```shell
python3 -m pip install --upgrade pip
python3 -m pip --version
pip 23.3.1 from .../.venv/lib/python3.9/site-packages (python 3.9)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first two commands look like they will upgrade the install of pip and then verify the version. The last line is the output rather than a command itself.

Recommendation is to either cut this section entirely or to update it.

```

</Expandable>

<Expandable alt_header="Windows" >

```shell
.venv\Scripts\activate
where python
.venv\Scripts\python
```
These commands will install the prerelease:

```shell
py -m pip install --upgrade pip
py -m pip --version
pip 23.3.1 from .venv\lib\site-packages (Python 3.9.4)
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


</Expandable>

If you’re using a different operating system, refer to [Git issue on Instructions to create a python virtual environment](https://github.com/dbt-labs/docs.getdbt.com/discussions/2143) for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know i mentioned linking to the github issue but maybe it's more direct to link them to the repo which has the toggles?

maybe that's more of a doug question to confirm?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than link to a GitHub Discussion or repo, I think we should either:

  1. exclude the instructions and exclude the links
  2. explicitly include the instructions for other operating system shells


</VersionBlock>
Loading