[Pythonmac-SIG] Running the pyPgSQL postgresql driver?
Marlon A. Griffith
marlong at rogers.com
Fri Dec 12 01:01:42 EST 2003
I have managed to install pyPgSQL on my mac:
- X.2.8
- postgresql 7.3
- MacPython 2.3, the July 30th 2003 release...
through the instructions at
http://pypgsql.sourceforge.net/README.html and the modifications
noted in an earlier post. I was running the testcases when I got this
message:
"""
[Kalyxsis-Sways-Computer:~] postgres% python
/Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py
Traceback (most recent call last):
File "/Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py", line
89, in ? from pyPgSQL import PgSQL
ImportError: No module named pyPgSQL
"""
I tried to import the module using Apple's python and MacPython.
MacPython worked and Apple's didn't. I got this error in Apple's
python:
"""
[Kalyxsis-Sways-Computer:~] postgres% python
Python 2.2 (#1, 07/14/02, 23:25:09)
[GCC Apple cpp-precomp 6.14] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyPgSQL import PgSQL
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named pyPgSQL
>>> ^D
"""
I then thought where is the module. The result is below:
"""
[Kalyxsis-Sways-Computer:~] postgres% locate pyPgSQL
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/__init__.py
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/__init__.pyc
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/PgSQL.py
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/PgSQL.pyc
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/__init__.py
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/__init__.pyc
"""
It appears then that the module was saved as a MacPython module. I
would like to run this module in MacPython and Apple's python. I have
two questions then:
1) How do I install this module in Apple's python. Is it a path thing
that I need to add to the environmental var, $PATH?
2) How do I run the testcases from MacPython? When I try and run it,
I don't get any feedback at all. If this is in some documentation
then please point me to that.
thanks for all you help.
--
Love and live well!
marlong at rogers.com
http://members.rogers.com/kalyxsis
"You gain strength, courage, and confidence by every experience in
which you really stop and look fear in the face." Eleanor Roosevelt
(1884-1962)
"Do not parrot the words of famous people. Learn the meaning of what they
say and repeat it in your own words." Mark Twain (not an exact quote).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031212/b198f8dc/attachment-0001.html
More information about the Pythonmac-SIG
mailing list