pygresql

Python连接mysql或postgres(sqlalchemy)

拟墨画扇 提交于 2020-02-29 10:26:24
安装 sudo pip install sqlalchemy 或sudo pip3 install sqlalchemy 下载速度慢可使用国内源,如: sudo pip install sqlalchemy -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com 测试1 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker eng = create_engine('mysql+mysqlconnector://y-user:y-passwd@127.0.0.1:3306/y-db?charset=utf8') #eng = create_engine('postgresql+psycopg2://y-user:y-passwd@127.0.0.1:5432/y-db',echo=True,client_encoding='utf8') DB_Session = sessionmaker(bind=eng) session = DB_Session() data = session.execute("SELECT * FROM y-table") for row in data: for

Unable to install PyGreSql on Centos

大憨熊 提交于 2019-12-13 18:13:14
问题 I'm doing the following to install PyGreSql on Centos: sudo pip3 install pygresql But I get the following error: Collecting PyGreSQL Using cached https://files.pythonhosted.org/packages/4a/65/03b1cd9b6daaa4e32ee72dd5fb1a01fbb7cd0dfe5439e34af6caa6ec60dc/PyGreSQL-5.0.6.tar.gz Building wheels for collected packages: PyGreSQL Running setup.py bdist_wheel for PyGreSQL Complete output from command /usr/local/bin/python3.5 -c "import setuptools;__file__='/tmp/pip-build-scnuzepv/PyGreSQL/setup.py'

How to install PyGreSQL using Virtualenv on Mac OS Sierra

时光总嘲笑我的痴心妄想 提交于 2019-12-08 08:10:36
问题 I'm configuring a virtualenv to work with a legacy webservices application developed on python using flask microframework and PostgreSQL database, this application use PyGreSQL 5.0.3 as a dependency to connect with the database. I have installed the PostgreSQL 9.6.1 , i installed it using: brew install postgresql I have installed and working with Python 2.7 When i run the pip install -r requirements.txt i'm gettin this error message: Running setup.py install for PyGreSQL ... error Complete

clang error when installing pygresql under Mac OS

隐身守侯 提交于 2019-12-07 21:23:58
问题 I was trying to install PyGreSQL under Mac OS X(10.11.3), but the same clang error occurs when installing from pip and source. $ python3 setup.py install running install running bdist_egg running egg_info writing PyGreSQL.egg-info/PKG-INFO writing top-level names to PyGreSQL.egg-info/top_level.txt writing dependency_links to PyGreSQL.egg-info/dependency_links.txt reading manifest file 'PyGreSQL.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'PyGreSQL.egg

clang error when installing pygresql under Mac OS

别说谁变了你拦得住时间么 提交于 2019-12-06 05:15:08
I was trying to install PyGreSQL under Mac OS X(10.11.3), but the same clang error occurs when installing from pip and source. $ python3 setup.py install running install running bdist_egg running egg_info writing PyGreSQL.egg-info/PKG-INFO writing top-level names to PyGreSQL.egg-info/top_level.txt writing dependency_links to PyGreSQL.egg-info/dependency_links.txt reading manifest file 'PyGreSQL.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'PyGreSQL.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.6-intel/egg running install_lib

ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

怎甘沉沦 提交于 2019-11-29 11:11:05
I have the same problem that was discussed here , but I haven't credit to comment an answer so I start new question. I have in PATH way to libpq.dll (C:\PostgreSql\lib) but it doesn't solve this problem. Using Python 2.7.9 32-bit, PostgreSQL 8.4, Win 8 Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import pg File "C:\Python27\lib\site-packages\pg.py", line 21, in <module> from _pg import * ImportError: DLL load failed: The specified module could not be found. I was also facing the same issue on Win 8 . First time I had installed PostgreSQL in "C:\Program Files" and

ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

血红的双手。 提交于 2019-11-28 04:34:07
问题 I have the same problem that was discussed here, but I haven't credit to comment an answer so I start new question. I have in PATH way to libpq.dll (C:\PostgreSql\lib) but it doesn't solve this problem. Using Python 2.7.9 32-bit, PostgreSQL 8.4, Win 8 Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import pg File "C:\Python27\lib\site-packages\pg.py", line 21, in <module> from _pg import * ImportError: DLL load failed: The specified module could not be found. 回答1: I