(my_env)user@web:~/myproject$ pip install psycopg2
Collecting psycopg2
Using cached psycopg2-2.6.1.tar.gz
setuptools must be installed to install from a source distribution
我安装了setuptools ...我在安装psycopg2之前从未见过这个错误
答案 0 :(得分:-2)
我有类似的问题并修复了安装python 3 dev:
$sudo apt-get install python3-dev