Ach!  Good to know - thanks...

On Sat, Aug 22, 2009 at 6:18 PM, ctalley <ctal...@caci.com> wrote:

>
> I'm just getting back to this after being on travel for a week.
>
> The path of consequence for python import statements is sys.path.
>
> >>> import sys
> >>> print sys.path
> [... 'C:\\Python26\\lib\\site-packages' ...]
>
> site-packages is indeed where psycopg2 is installed so no problem
> there.
>
> Loooong story short, the latest build of psycopg2 (2.0.12) has a bug.
> I installed 2.0.10 and the problem went away.
>
> Thanks.
>
> On Aug 17, 1:09 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> > ok - so that says you have python installed somewhere, and associated
> with
> > your *.py files (to execute them) - but it is not in your path;
> >
> > You either need to type the path to your python executable (on windows,
> the
> > default would be something like c:/python/python.exe)  or add it to your
> > path variable - then try the import statement from the python prompt...
> >
> >
> >
> > On Mon, Aug 17, 2009 at 12:03 PM, ctalley <ctal...@caci.com> wrote:
> >
> > > web2py.exe is on the machine, but not running.  I'm running from
> > > web2py.py (source).
> >
> > > Does it matter how it's started?  I started it by navigating to the
> > > web2py source folder and double clicking web2py.py.
> >
> > > On Aug 17, 12:47 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> > > > I see - are you running web2py.exe then?
> >
> > > > On Mon, Aug 17, 2009 at 11:37 AM, ctalley <ctal...@caci.com> wrote:
> >
> > > > > from the command prompt...
> >
> > > > > C:\>python
> > > > > 'python' is not recognized as an internal or external command,
> > > > > operable program or batch file.
> >
> > > > > On Aug 17, 12:16 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> > > > > > if you try this from cmd shell, what do you get:
> >
> > > > > > C:>  python
> > > > > > Python 2.6.2
> > > > > > Type "help", "copyright", "credits" or "license" for more
> > > information.
> >
> > > > > > >>> import psycopg2
> > > > > > >>> dir('psycopg2')
> > > > > > On Mon, Aug 17, 2009 at 10:57 AM, ctalley <ctal...@caci.com>
> wrote:
> >
> > > > > > > I've been using SQLite and am trying to migrate to PostgreSQL.
> >
> > > > > > > I'm getting this error immediately when starting my
> application...
> > > > > > > NameError: global name 'psycopg2' is not defined
> >
> > > > > > > ...on this configuration...
> > > > > > > operating system: Windows XP
> >
> > > > > > > web2py: version 1.66.0 source
> >
> > > > > > > python: version 2.6.2 Windows
> >
> > > > > > > psycopg2: version 2.0.12 for python 2.6
> >
> > > > > > > Anything obviously wrong?
> >
> > > > > > > Thanks.
> >
> > > > > > > BTW, in case this hasn't already been pointed out, page 213 of
> the
> > > > > > > current manual has a typo.  It says...
> > > > > > > db=SQLDB("postgres:myuser:mypassw...@localhost:5432/mydb")
> >
> > > > > > > but should say...
> > > > > > > db=SQLDB("postgres://myuser:mypassw...@localhost:5432/mydb")
> > > > > > > (note the // is missing in the first version)- Hide quoted text
> -
> >
> > > > > > - Show quoted text -- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to