Re: Getting psycopg2 to work in cygwin on Windows Vista

Farhan Ahmad <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Finally, I figured out that the problem was missing dependencies, which,
unfortunately, cygwin isn't so obvious about.  If you are curious about the
details then checkout the following link to my blog entry about this:
http://www.thebitguru.com/blog/view/265-Getting%20psycopg2%20to%20work%20in%20cygwin


Thanks,
Farhan

On Mon, 14 Jul 2008 00:15:47 -0500, Farhan Ahmad <[email protected]>
wrote:
> Thanks for the reply, Daniele.  Yes, I did.  Looking at the output that I
> sent before I did notice that it had a dlopen() call, but the dll does
> exist at that path.  I have tried playing around with the permissions in
> both Vista and cygwin, but with no luck.
> 
> dlopen("/usr/lib/python2.5/site-packages/psycopg2/_psycopg.dll", 2);
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/python2.5/site-packages/psycopg2/__init__.py", line 60,
> in
> <module>
>     from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
> ImportError: No such file or directory
> 
> Here are the contents of that directory.
> 
> 509 psycopg2 $ pwd
> /usr/lib/python2.5/site-packages/psycopg2
> 510 TheBitGuru@visionary psycopg2 $ ll
> total 416
> -rw-r--r-- 1 TheBitGuru None   2774 Jul 13 00:38 __init__.py
> -rw-r--r-- 1 TheBitGuru None   2379 Jul 13 12:59 __init__.pyc
> -rwxrwxrwx 1 TheBitGuru None 315420 Jul 13 13:17 _psycopg.dll
> -rw-r--r-- 1 TheBitGuru None  10138 Jul 13 00:38 errorcodes.py
> -rw-r--r-- 1 TheBitGuru None  10511 Jul 13 12:59 errorcodes.pyc
> -rw-r--r-- 1 TheBitGuru None   2487 Jul 13 00:38 extensions.py
> -rw-r--r-- 1 TheBitGuru None   2410 Jul 13 12:59 extensions.pyc
> -rw-r--r-- 1 TheBitGuru None   7396 Jul 13 00:38 extras.py
> -rw-r--r-- 1 TheBitGuru None  11038 Jul 13 12:59 extras.pyc
> -rw-r--r-- 1 TheBitGuru None   6031 Jul 13 13:42 output.txt
> -rw-r--r-- 1 TheBitGuru None   7847 Jul 13 00:38 pool.py
> -rw-r--r-- 1 TheBitGuru None   8808 Jul 13 12:59 pool.pyc
> -rw-r--r-- 1 TheBitGuru None   2804 Jul 13 00:38 psycopg1.py
> -rw-r--r-- 1 TheBitGuru None   3370 Jul 13 12:59 psycopg1.pyc
> -rw-r--r-- 1 TheBitGuru None   2973 Jul 13 00:38 tz.py
> -rw-r--r-- 1 TheBitGuru None   3502 Jul 13 12:59 tz.pyc
> 511 psycopg2 $
> 
> 
> Thanks,
> Farhan
> 
> On Mon, 14 Jul 2008 01:50:35 +0100, Daniele Varrazzo
> <[email protected]> wrote:
>> Farhan Ahmad ha scritto:
>>
>>> I am trying to get psycopg2 to work on Windows Vista through cygwin.
>>> Everything compiles fine, but when I import it python says that it
> can't
>>> findany module by that name.  I have attached the output from a "python
>>> -v" session.  Does anyone have any ideas why the system cannot find the
>>> _psycopg?  Everything compiled and installed without any issues.
>>
>> Did you issue "python setup.py install" in the psycopg directory?
>>
>> If everything compiled fine, you should have a "_psycopg.dll" in a
>> subdirectory under "build", which is not included in the pythonpath. The
>> above
>> command should put all the pieces in the proper place.
>>
>> -- Daniele
> 
> _______________________________________________
> Psycopg mailing list
> Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
> http://lists.initd.org/mailman/listinfo/psycopg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.