【问题标题】:bad interpreter: Permission denied糟糕的解释器:权限被拒绝
【发布时间】:2019-12-19 14:01:46
【问题描述】:

我无法安装 psycopg2。我尝试将数据库从 sqlite 更改为 postgesql,但总是得到相同的错误。我还尝试通过项目解释器而不是我的终端安装它,但得到:

python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

(venv) localhost:mysite Sergio$ pip install psycopg2
bash: /Users/Sergio/PycharmProjects/#WE_GRAPPLE/venv/bin/pip: /Users/Sergio/PycharmProjects/#WE_GRAPPLE/venv/bin/python: bad interpreter: Permission denied
(venv) localhost:mysite Sergio$

【问题讨论】:

    标签: python django postgresql pycharm


    【解决方案1】:

    确保你有 pip 的权限,你可以更改为 root

    su root 
    

    输入你的root密码,然后

    pip install psycopg2
    

    【讨论】:

    • 我试过了,还是没解决。您还有其他可能导致错误的建议吗?
    • 当你su root时,你的权限仍然不好?
    • 安装收集的包:psycopg2 为 psycopg2 运行 setup.py install ... 错误错误:命令出错,退出状态为 1:
    • 现在有一个不同的错误。
    • 对不起,我不知道怎么解决。
    猜你喜欢
    • 2015-06-14
    • 1970-01-01
    • 2016-08-23
    • 1970-01-01
    • 1970-01-01
    • 2015-06-26
    • 1970-01-01
    • 2015-08-30
    相关资源
    最近更新 更多