Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'html
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-7n6622n7/psycopg2/python
解决方案:sql
1.pip install -U pip数据库
2.pipinstall pyscopg2-binaryapp
提早准备安装PostgreSQL数据库ide
sudo apt-get update sudo apt-get install postgresql postgresql-client
安装完毕后,系统会建立一个数据库超级用户 postgres,密码为空sudo -i -u postgres
post
psql
ui
二.实例:
spa
一、建立一个数据库 mydb:postgresql
1 |
|
二、为数据库更名:
1 |
|
三、登陆数据库:
1 |
|
转载参考:https://www.runoob.com/postgresql/postgresql-tutorial.html