Error: No module named psycopg2.extensions

前端 未结 18 1997
感动是毒
感动是毒 2020-12-02 07:35

I am trying to set up a PostgreSQL database for my django project, which I believe I have done now thanks to the replies to my last question Problems setting up a postgreSQL

18条回答
  •  遥遥无期
    2020-12-02 08:18

    I had such problem when trying to run python script as a sudo, while psycopg2 was installed via pip3 to my own user's directory.

    I managed to resolve the issue for myself removing pip3 version, and just installing it via apt:

    pip3 uninstall psycopg2
    sudo apt install python3-psycopg2
    

提交回复
热议问题