Skip to content

Commit 24d1e1e

Browse files
Merge pull request #6 from NYPL/ammend-readme
Add troubleshooting to README
2 parents a1ee916 + a599054 commit 24d1e1e

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This package contains common Python utility classes and functions.
1919
## Developing locally
2020
In order to use the local version of the package instead of the global version, use a virtual environment. To set up a virtual environment and install all the necessary dependencies, run:
2121

22-
```bash
22+
```
2323
python3 -m venv testenv
2424
source testenv/bin/activate
2525
pip install --upgrade pip
@@ -30,6 +30,22 @@ deactivate && source testenv/bin/activate
3030

3131
Add any new dependencies required by code in the `nypl_py_utils` directory to the `dependencies` section of `pyproject.toml`. Add dependencies only required by code in the `tests` directory to the `[project.optional-dependencies]` section.
3232

33+
### Troubleshooting
34+
If running `main.py` in this virtual environment produces the following error:
35+
```
36+
ImportError: no pq wrapper available.
37+
Attempts made:
38+
- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
39+
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
40+
- couldn't import psycopg 'python' implementation: dlsym(0x7f8620446f40, PQsslInUse): symbol not found
41+
```
42+
43+
then try running:
44+
```
45+
pip uninstall psycopg
46+
pip install "psycopg[c]"
47+
```
48+
3349
## Git workflow
3450
This repo uses the [Main-QA-Production](https://github.com/NYPL/engineering-general/blob/main/standards/git-workflow.md#main-qa-production) git workflow.
3551

0 commit comments

Comments
 (0)