You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application

后端 未结 9 1024
半阙折子戏
半阙折子戏 2020-12-22 17:10

I am working on Django project with virtualenv and connect it to local postgres database. when i run the project is says,

ImportError: No module named psycop         


        
9条回答
  •  盖世英雄少女心
    2020-12-22 17:56

    Use these following commands, this will solve the error:

    sudo apt-get install postgresql
    

    then fire:

    sudo apt-get install python-psycopg2
    

    and last:

    sudo apt-get install libpq-dev
    

提交回复
热议问题