unitedstates / congressional-record

A parser for the Congressional Record.
Other
128 stars 40 forks source link

ElCap and psycopg errors #45

Closed lmatchet2 closed 3 years ago

lmatchet2 commented 3 years ago

Hello- there seems to be an error associated with relative library locations and psycopg in the new Mac ElCap. I've dug around the internet for general solutions, but none seem to reference fixing this inside a venv. I've tried solutions at https://github.com/psycopg/psycopg2/issues/385 and https://stackoverflow.com/questions/11618898/pg-config-executable-not-found but without any results (its either permission denied to change the links, or they're linking to files that don't exist, and Im not sure how to make them exist).

As it is once everything is downloaded, when I run '.venv/bin/python -m congressionalrecord.cli -h'

I'm getting the following error: ImportError: dlopen(/Users/leah/congressional-record/.venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so, 2): Library not loaded: @rpath/libssl.1.1.dylib Referenced from: /Users/leah/congressional-record/.venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so Reason: image not found

Apologies if this is something painfully obvious, I'm not the best at this. I'm not sure if this is something you can fix on the back end. Thanks regardless for your time.

dwillis commented 3 years ago

@lmatchet2 this seems like an openssl error, which is not something we can fix in this package.

nclarkjudd commented 3 years ago

@lmatchet2 @dwillis is correct and there's nothing we can do. I can't guarantee these steps won't make matters worse rather than better, and try them at your own risk, but you may want to try:

  1. installing/updating libssl on your system
  2. installing psycopg2-binary in your venv instead of pyscopg2. This installs a precompiled version instead of compiling from source on your machine, and that sometimes solves issues of this kind.

Good luck!