Is there some magic trick to get pipenv
to install psycopg2
?
My Pipfile
looks like this:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "==2.1.3"
psycopg2 = "*"
[dev-packages]
[requires]
python_version = "3.6"
I've tried adding and taking away an install of pyscopg2-binary, but it makes no difference. I am on a Mac running OSX 10.14.4.
Here is the output I get after running pipenv install
:
An error occurred while installing psycopg2==2.8.3 --hash=sha256:128d0fa910ada0157bba1cb74a9c5f92bb8a1dca77cf91a31eb274d1f889e001 --hash=sha256:227fd46cf9b7255f07687e5bde454d7d67ae39ca77e170097cdef8ebfc30c323 --hash=sha256:2315e7f104681d498ccf6fd70b0dba5bce65d60ac92171492bfe228e21dcc242 --hash=sha256:4b5417dcd2999db0f5a891d54717cfaee33acc64f4772c4bc574d4ff95ed9d80 --hash=sha256:640113ddc943522aaf71294e3f2d24013b0edd659b7820621492c9ebd3a2fb0b --hash=sha256:897a6e838319b4bf648a574afb6cabcb17d0488f8c7195100d48d872419f4457 --hash=sha256:8dceca81409898c870e011c71179454962dec152a1a6b86a347f4be74b16d864 --hash=sha256:b1b8e41da09a0c3ef0b3d4bb72da0dde2abebe583c1e8462973233fd5ad0235f --hash=sha256:cb407fccc12fc29dc331f2b934913405fa49b9b75af4f3a72d0f50f57ad2ca23 --hash=sha256:d3a27550a8185e53b244ad7e79e307594b92fede8617d80200a8cce1fba2c60f --hash=sha256:f0e6b697a975d9d3ccd04135316c947dd82d841067c7800ccf622a8717e98df1! Will try again.
π ββββββββββββββββββββββββββββββββ 7/7 β 00:00:45
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/
............
...........
6m-darwin.so', ' ld: library not found for -lssl', ' clang: error: linker command failed with exit code 1 (use -v to see invocation)', " error: command 'gcc' failed with exit status 1", ' ----------------------------------------', 'ERROR: Command "/Users/mdd/.local/share/virtualenvs/justfacts-2tIl3QYb/bin/python3 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/private/var/folders/jz/s0hyvf2n5yd8glg82gphcn9h0000gp/T/pip-install-f6uqfqa9/psycopg2/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /private/var/folders/jz/s0hyvf2n5yd8glg82gphcn9h0000gp/T/pip-record-k9xlsee0/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mdd/.local/share/virtualenvs/justfacts-2tIl3QYb/bin/../include/site/python3.6/psycopg2" failed with error code 1 in /private/var/folders/jz/s0hyvf2n5yd8glg82gphcn9h0000gp/T/pip-install-f6uqfqa9/psycopg2/']
I've tried the recommended commands, such as pipenv clean
, even tried everything from scratch in new directory and no Pipfile
, but no luck. When I attempt to install psycopg2 directly via pipenv install pyscopg2
, same result.
ssl
library is missing. Trybrew install openssl
and then run thepipenv
command again.brew unlink openssl && brew link openssl --force