Skip to content

Commit 87bf417

Browse files
chbndrhnnsJohannes Rueschel
andauthored
Update pip commands to install 1.10 (#6930)
Co-authored-by: Johannes Rueschel <[email protected]>
1 parent d9c2af3 commit 87bf417

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

changes/6930-chbndrhnns.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Docs: Fix pip commands to install v1

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To make contributing as easy and fast as possible, you'll want to run tests and
3333
*pydantic* has few dependencies, doesn't require compiling and tests don't need access to databases, etc.
3434
Because of this, setting up and running the tests should be very simple.
3535

36-
You'll need to have a version between **Python 3.7 and 3.11**, **virtualenv**, **git**, and **make** installed.
36+
You'll need to have a version between **Python 3.7 and 3.11**, **virtualenv**, **git**, **pdm** and **make** installed.
3737

3838
```bash
3939
# 1. clone your fork and cd into the repo directory

docs/install.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installation is as simple as:
22

33
```bash
4-
pip install pydantic
4+
pip install 'pydantic<2'
55
```
66

77
*pydantic* has no required dependencies except Python 3.7, 3.8, 3.9, 3.10 or 3.11 and
@@ -12,7 +12,7 @@ Pydantic is also available on [conda](https://www.anaconda.com) under the [conda
1212
channel:
1313

1414
```bash
15-
conda install pydantic -c conda-forge
15+
conda install 'pydantic<2' -c conda-forge
1616
```
1717

1818
## Compiled with Cython
@@ -36,7 +36,7 @@ print('compiled:', pydantic.compiled)
3636
Compiled binaries can increase the size of your Python environment. If for some reason you want to reduce the size of your *pydantic* installation you can avoid installing any binaries using the [`pip --no-binary`](https://pip.pypa.io/en/stable/cli/pip_install/#install-no-binary) option. Make sure `Cython` is not in your environment, or that you have the `SKIP_CYTHON` environment variable set to avoid re-compiling *pydantic* libraries:
3737

3838
```bash
39-
SKIP_CYTHON=1 pip install --no-binary pydantic pydantic
39+
SKIP_CYTHON=1 pip install --no-binary pydantic pydantic<2
4040
```
4141
!!! note
4242
`pydantic` is repeated here intentionally, `--no-binary pydantic` tells `pip` you want no binaries for pydantic,
@@ -47,7 +47,7 @@ Alternatively, you can re-compile *pydantic* with custom [build options](https:/
4747
CFLAGS="-Os -g0 -s" pip install \
4848
--no-binary pydantic \
4949
--global-option=build_ext \
50-
pydantic
50+
pydantic<2
5151
```
5252

5353
## Optional dependencies
@@ -60,11 +60,11 @@ CFLAGS="-Os -g0 -s" pip install \
6060

6161
To install these along with *pydantic*:
6262
```bash
63-
pip install pydantic[email]
63+
pip install 'pydantic[email]<2'
6464
# or
65-
pip install pydantic[dotenv]
65+
pip install 'pydantic[dotenv]<2'
6666
# or just
67-
pip install pydantic[email,dotenv]
67+
pip install 'pydantic[email,dotenv]<2'
6868
```
6969

7070
Of course, you can also install these requirements manually with `pip install email-validator` and/or `pip install python-dotenv`.
@@ -74,7 +74,7 @@ Of course, you can also install these requirements manually with `pip install em
7474

7575
And if you prefer to install *pydantic* directly from the repository:
7676
```bash
77-
pip install git+git://github.com/pydantic/pydantic@main#egg=pydantic
77+
pip install git+https://github.com/pydantic/pydantic@1.10.X-fixes#egg=pydantic
7878
# or with extras
79-
pip install git+git://github.com/pydantic/pydantic@main#egg=pydantic[email,dotenv]
79+
pip install git+https;://github.com/pydantic/pydantic@1.10.X-fixes#egg=pydantic[email,dotenv]
8080
```

0 commit comments

Comments
 (0)