Skip to content

Instantly share code, notes, and snippets.

@geekforbrains
Created November 15, 2016 21:01
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save geekforbrains/3a2836dac8a147a91b0600fcfff3c58d to your computer and use it in GitHub Desktop.
Save geekforbrains/3a2836dac8a147a91b0600fcfff3c58d to your computer and use it in GitHub Desktop.
Installing psycopg2 in virtualenv on macOS Sierra
$ xcode-select --install
$ brew install openssl
$ virtualenv env
$ . env/bin/activate
$(env) env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2
@iamjayakumars
Copy link

iamjayakumars commented Dec 16, 2016

While Entered the

"Return Key"

getting the following error

Using base prefix '/Users/jay/anaconda'
New python executable in /Users/jay/venv/bin/python
dyld: Library not loaded: @rpath/libpython3.5m.dylib
  Referenced from: /Users/jay/venv/bin/python
  Reason: image not found
ERROR: The executable /Users/jay/venv/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/jay' (should be '/Users/jay/venv')
ERROR: virtualenv is not compatible with this system or executable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment