为什么psycopg2无法在Mac OS Catalina版本10.15.3上正确安装

时间:2020-02-18 08:09:13

标签: python postgresql macos psycopg2

这是我收到的错误消息

  Building wheel for psycopg2 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/macbookpro/Documents/brck/subscription_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b1/wfq4dcls5dbdjq9zl49z_6t40000gp/T/pip-install-6btertcf/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/b1/wfq4dcls5dbdjq9zl49z_6t40000gp/T/pip-install-6btertcf/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/b1/wfq4dcls5dbdjq9zl49z_6t40000gp/T/pip-wheel-zfvo13ls
       cwd: /private/var/folders/b1/wfq4dcls5dbdjq9zl49z_6t40000gp/T/pip-install-6btertcf/psycopg2/

如果有人有解决方案,请与我们联系

1 个答案:

答案 0 :(得分:0)

我通过安装psycopg2-binary而不是psycopg2来回答此问题 我提到了这个问题:https://github.com/psycopg/psycopg2/issues/674 而这个(Python) psycopg2 installation