您的位置:首页 > 编程语言 > Python开发

python问题汇总

2015-11-13 10:06 381 查看

解决中文编码

在程序开头加上,

# coding: utf-8 or ### -*- codi -*- codi -*- coding: utf-8 -*-


安装psycopg2模块

psycopg2模块用来支持python连接PostgreSQL,安装代码如下:

yum install postgresql-libs
yum install python-setuptools
yum -y install python-psycopg2


ubuntu下执行
sudo apt-get install python-psycopg2
即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: