Skip to content

Commit 168b671

Browse files
authored
Update install.md - Add PostgreSQL Installation Dependency
I was referring to the SQLModel documentation but using PostgreSQL. After a lot of troubleshooting, I identified that I need to additionally install a database driver. Good to add this for new/junior developers.
1 parent ffdcb44 commit 168b671

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/install.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ Python has integrated support for SQLite, it is a single file read and processed
2424

2525
In fact, SQLite is perfectly capable of handling quite big applications. At some point you might want to migrate to a server-based database like <a href="https://www.postgresql.org/" class="external-link" target="_blank">PostgreSQL</a> (which is also free). But for now we'll stick to SQLite.
2626

27+
/// info
28+
29+
In case you're using PostgreSQL, SQLModel does not install a database driver (such as Psycopg) and you'll need to install a database driver yourself.
30+
31+
To install psycopg v3, run the following commands:
32+
33+
pip install --upgrade pip
34+
pip install psycopg[binary]
35+
36+
This installs the binary version (recommended for most users)
37+
38+
For other installation options, see the <a href="https://www.psycopg.org/psycopg3/docs/basic/install.html" class="external-link" target="_blank">Psycopg documentation</a>.
39+
40+
///
41+
2742
Through the tutorial I will show you SQL fragments, and Python examples. And I hope (and expect 🧐) you to actually run them, and verify that the database is working as expected and showing you the same data.
2843

2944
To be able to explore the SQLite file yourself, independent of Python code (and probably at the same time), I recommend you use <a href="https://sqlitebrowser.org/" class="external-link" target="_blank">DB Browser for SQLite</a>.

0 commit comments

Comments
 (0)