Re: Help installing Psycopg2 and/or MySQL-python on OS X
I used to install and compile all my components by hand, but I recently switched to using MacPorts, and I highly recommend it. I installed everything: Apache 2, MySQL, Python 2.5, mod_python, py- mysql from macports and it just works together. Macports has a psycopg2 package. On Sep 2, 4:04 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have Python 2.5.1 and Django installed and running on OS X 10.4.10, > but can't seem to get either the Psycopg2 or MySQL-python bindings > installed so I can actually use a database with Django. > > I have the latest version of PostgreSQL and MySQL5 installed and > running. Can someone please get me pointed in the right direction?! > > Many thanks in advance, > Brandon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Help installing Psycopg2 and/or MySQL-python on OS X
Thank you very much to everyone for your help. It took a few tries, but I finally got the paths configured correctly in my setup.conf for psycopyg. I'm working through the first tutorial. Looks like I need to grab the newest Django source from subversion. But, I'm able to create and sync my models now. I haven't touched Python in a long time, I've been mostly working in Microsoft technologies over the past few years, but I've become quite the fan of Ruby on Rails over the past few months. I'm a senior developer with Avenue A | Razorfish in Austin, and I'm looking into Django as a possible competitor to Java. Python is much more mature than Ruby, so our technical architects aren't quite as eager to support Rails as I'd like. Django seems very similar to Rails, so I'm hopeful it won't take long to get up to speed. I have to say the installation of all of the necessary softwares to get Django running wasn't nearly as smooth as Rails, especially on the OS X side, so I'm hopeful that the speed of Python will make up for that. Does anyone have an example of a good organizational schema for an Ajax-enabled Django site? By that, I mean how are you guys organizing your directories? I'm a little fuzzy on the structure of a "typical" website. What should the public-facing root of the site be? Should my Python code go outside that, similar to the way Rails has its "App" folder and "Public" folders? Again, my sincere thanks for your advice and guidance! Brandon On Sep 2, 9:37 pm, Nick Fishman <[EMAIL PROTECTED]> wrote: > On Sep 2, 9:37 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > > > Looks like you're missing some header files... > > > Maybe postgres didn't put everything where it needed to be. You also may > > need the dev packages for postgres. > > The problem is, indeed, in the development packages. There's a package > called libpq-dev that contains this file (stored in /usr/include/ > postgresql/libpq-fe.h). I installed postgresql-server-dev-8.2 and it > got installed as a dependency, but you might be able to install the > package on its own. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Help installing Psycopg2 and/or MySQL-python on OS X
On Sep 2, 9:37 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > Looks like you're missing some header files... > > Maybe postgres didn't put everything where it needed to be. You also may > need the dev packages for postgres. The problem is, indeed, in the development packages. There's a package called libpq-dev that contains this file (stored in /usr/include/ postgresql/libpq-fe.h). I installed postgresql-server-dev-8.2 and it got installed as a dependency, but you might be able to install the package on its own. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Help installing Psycopg2 and/or MySQL-python on OS X
On 9/2/07, Brandon Taylor <[EMAIL PROTECTED]> wrote: > I have Python 2.5.1 and Django installed and running on OS X 10.4.10, > but can't seem to get either the Psycopg2 or MySQL-python bindings > installed so I can actually use a database with Django. For Mac, this is the easiest way to get the necessary modules: http://pythonmac.org/packages/py25-fat/index.html -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Help installing Psycopg2 and/or MySQL-python on OS X
Looks like you're missing some header files... On Sun, 2007-09-02 at 16:14 -0700, Brandon Taylor wrote: > Hi Todd, > > Here is a copy of my terminal session: > > running install > running build > running build_py > running build_ext > Warning: /bin/sh: line 1: pg_config: command not found Maybe postgres didn't put everything where it needed to be. You also may need the dev packages for postgres. > building 'psycopg2._psycopg' extension > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - > fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - > fno-common -dynamic -DNDEBUG -g -O3 -DPY_MAJOR_VERSION=2 - > DPY_MINOR_VERSION=5 -DHAVE_PYBOOL=1 -DHAVE_DECIMAL=1 - > DHAVE_PYDATETIME=1 -DPSYCOPG_DEFAULT_PYDATETIME=1 - > DPSYCOPG_VERSION="2.0.6 (dec dt ext pq3)" -DPSYCOPG_EXTENSIONS=1 - > DPSYCOPG_DISPLAY_SIZE=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 - > DHAVE_PQPROTOCOL3=1 -I/Library/Frameworks/Python.framework/Versions/ > 2.5/include/python2.5 -I. -c psycopg/psycopgmodule.c -o build/ > temp.macosx-10.3-fat-2.5/psycopg/psycopgmodule.o > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/connection.h:27:22: error: libpq-fe.h: No such file or > directory This looks like a missing library and all the warnings below could be problems with incompatibility between versions of gcc. Have you tried fink? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Help installing Psycopg2 and/or MySQL-python on OS X
You may need to edit the setup.cfg file to point to the correct location of your pg_config file. For example: /usr/local/pgsql/bin. - Griffin On Sep 2, 2007, at 6:14 PM, Brandon Taylor wrote: > > Hi Todd, > > Here is a copy of my terminal session: > > running install > running build > running build_py > running build_ext > Warning: /bin/sh: line 1: pg_config: command not found > building 'psycopg2._psycopg' extension > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - > fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - > fno-common -dynamic -DNDEBUG -g -O3 -DPY_MAJOR_VERSION=2 - > DPY_MINOR_VERSION=5 -DHAVE_PYBOOL=1 -DHAVE_DECIMAL=1 - > DHAVE_PYDATETIME=1 -DPSYCOPG_DEFAULT_PYDATETIME=1 - > DPSYCOPG_VERSION="2.0.6 (dec dt ext pq3)" -DPSYCOPG_EXTENSIONS=1 - > DPSYCOPG_DISPLAY_SIZE=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 - > DHAVE_PQPROTOCOL3=1 -I/Library/Frameworks/Python.framework/Versions/ > 2.5/include/python2.5 -I. -c psycopg/psycopgmodule.c -o build/ > temp.macosx-10.3-fat-2.5/psycopg/psycopgmodule.o > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/connection.h:27:22: error: libpq-fe.h: No such file or > directory > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/connection.h:56: error: parse error before 'PGconn' > ./psycopg/connection.h:56: warning: no semicolon at end of struct or > union > ./psycopg/connection.h:83: error: parse error before '}' token > ./psycopg/connection.h:83: warning: data definition has no type or > storage class > ./psycopg/connection.h:86: error: parse error before '*' token > ./psycopg/connection.h:87: error: parse error before '*' token > ./psycopg/connection.h:88: error: parse error before '*' token > ./psycopg/connection.h:89: error: parse error before '*' token > ./psycopg/connection.h:90: error: parse error before '*' token > ./psycopg/connection.h:91: error: parse error before '*' token > In file included from psycopg/psycopgmodule.c:30: > ./psycopg/cursor.h:40: error: parse error before 'connectionObject' > ./psycopg/cursor.h:40: warning: no semicolon at end of struct or union > ./psycopg/cursor.h:42: error: parse error before ':' token > ./psycopg/cursor.h:43: error: parse error before ':' token > ./psycopg/cursor.h:44: error: parse error before ':' token > ./psycopg/cursor.h:56: error: parse error before '*' token > ./psycopg/cursor.h:56: warning: data definition has no type or storage > class > ./psycopg/cursor.h:58: error: parse error before 'lastoid' > ./psycopg/cursor.h:58: warning: data definition has no type or storage > class > ./psycopg/cursor.h:80: error: parse error before '}' token > ./psycopg/cursor.h:80: warning: data definition has no type or storage > class > ./psycopg/cursor.h:83: error: parse error before '*' token > In file included from psycopg/psycopgmodule.c:32: > ./psycopg/microprotocols.h:54: error: parse error before > 'connectionObject' > ./psycopg/microprotocols.h:57: error: parse error before '*' token > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/connection.h:27:22: error: libpq-fe.h: No such file or > directory > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/connection.h:56: error: parse error before 'PGconn' > ./psycopg/connection.h:56: warning: no semicolon at end of struct or > union > ./psycopg/connection.h:83: error: parse error before '}' token > ./psycopg/connection.h:83: warning: data definition has no type or > storage class > ./psycopg/connection.h:86: error: parse error before '*' token > ./psycopg/connection.h:87: error: parse error before '*' token > ./psycopg/connection.h:88: error: parse error before '*' token > ./psycopg/connection.h:89: error: parse error before '*' token > ./psycopg/connection.h:90: error: parse error before '*' token > ./psycopg/connection.h:91: error: parse error before '*' token > In file included from psycopg/psycopgmodule.c:30: > ./psycopg/cursor.h:40: error: parse error before 'connectionObject' > ./psycopg/cursor.h:40: warning: no semicolon at end of struct or union > ./psycopg/cursor.h:42: error: parse error before ':' token > ./psycopg/cursor.h:43: error: parse error before ':' token > ./psycopg/cursor.h:44: error: parse error before ':' token > ./psycopg/cursor.h:56: error: parse error before '*' token > ./psycopg/cursor.h:56: warning: data definition has no type or storage > class > ./psycopg/cursor.h:58: error: parse error before 'lastoid' > ./psycopg/cursor.h:58: warning: data definition has no type or storage > class > ./psycopg/cursor.h:80: error: parse error before '}' token > ./psycopg/cursor.h:80: warning: data definition has no type or storage > class > ./psycopg/cursor.h:83: error: parse error before '*' token > In file included from psycopg/psycopgmodule.c:32: > ./psycopg/microprotocols.h:54: error: parse error before > 'connectionObject' > ./psycopg/microprotocols.h:57: error: parse error before '*' token > psycopg/psycopgmodule.c:101: error: parse error before '*'
Re: Help installing Psycopg2 and/or MySQL-python on OS X
Hi Todd, Here is a copy of my terminal session: running install running build running build_py running build_ext Warning: /bin/sh: line 1: pg_config: command not found building 'psycopg2._psycopg' extension gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -DPY_MAJOR_VERSION=2 - DPY_MINOR_VERSION=5 -DHAVE_PYBOOL=1 -DHAVE_DECIMAL=1 - DHAVE_PYDATETIME=1 -DPSYCOPG_DEFAULT_PYDATETIME=1 - DPSYCOPG_VERSION="2.0.6 (dec dt ext pq3)" -DPSYCOPG_EXTENSIONS=1 - DPSYCOPG_DISPLAY_SIZE=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 - DHAVE_PQPROTOCOL3=1 -I/Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5 -I. -c psycopg/psycopgmodule.c -o build/ temp.macosx-10.3-fat-2.5/psycopg/psycopgmodule.o In file included from psycopg/psycopgmodule.c:29: ./psycopg/connection.h:27:22: error: libpq-fe.h: No such file or directory In file included from psycopg/psycopgmodule.c:29: ./psycopg/connection.h:56: error: parse error before 'PGconn' ./psycopg/connection.h:56: warning: no semicolon at end of struct or union ./psycopg/connection.h:83: error: parse error before '}' token ./psycopg/connection.h:83: warning: data definition has no type or storage class ./psycopg/connection.h:86: error: parse error before '*' token ./psycopg/connection.h:87: error: parse error before '*' token ./psycopg/connection.h:88: error: parse error before '*' token ./psycopg/connection.h:89: error: parse error before '*' token ./psycopg/connection.h:90: error: parse error before '*' token ./psycopg/connection.h:91: error: parse error before '*' token In file included from psycopg/psycopgmodule.c:30: ./psycopg/cursor.h:40: error: parse error before 'connectionObject' ./psycopg/cursor.h:40: warning: no semicolon at end of struct or union ./psycopg/cursor.h:42: error: parse error before ':' token ./psycopg/cursor.h:43: error: parse error before ':' token ./psycopg/cursor.h:44: error: parse error before ':' token ./psycopg/cursor.h:56: error: parse error before '*' token ./psycopg/cursor.h:56: warning: data definition has no type or storage class ./psycopg/cursor.h:58: error: parse error before 'lastoid' ./psycopg/cursor.h:58: warning: data definition has no type or storage class ./psycopg/cursor.h:80: error: parse error before '}' token ./psycopg/cursor.h:80: warning: data definition has no type or storage class ./psycopg/cursor.h:83: error: parse error before '*' token In file included from psycopg/psycopgmodule.c:32: ./psycopg/microprotocols.h:54: error: parse error before 'connectionObject' ./psycopg/microprotocols.h:57: error: parse error before '*' token In file included from psycopg/psycopgmodule.c:29: ./psycopg/connection.h:27:22: error: libpq-fe.h: No such file or directory In file included from psycopg/psycopgmodule.c:29: ./psycopg/connection.h:56: error: parse error before 'PGconn' ./psycopg/connection.h:56: warning: no semicolon at end of struct or union ./psycopg/connection.h:83: error: parse error before '}' token ./psycopg/connection.h:83: warning: data definition has no type or storage class ./psycopg/connection.h:86: error: parse error before '*' token ./psycopg/connection.h:87: error: parse error before '*' token ./psycopg/connection.h:88: error: parse error before '*' token ./psycopg/connection.h:89: error: parse error before '*' token ./psycopg/connection.h:90: error: parse error before '*' token ./psycopg/connection.h:91: error: parse error before '*' token In file included from psycopg/psycopgmodule.c:30: ./psycopg/cursor.h:40: error: parse error before 'connectionObject' ./psycopg/cursor.h:40: warning: no semicolon at end of struct or union ./psycopg/cursor.h:42: error: parse error before ':' token ./psycopg/cursor.h:43: error: parse error before ':' token ./psycopg/cursor.h:44: error: parse error before ':' token ./psycopg/cursor.h:56: error: parse error before '*' token ./psycopg/cursor.h:56: warning: data definition has no type or storage class ./psycopg/cursor.h:58: error: parse error before 'lastoid' ./psycopg/cursor.h:58: warning: data definition has no type or storage class ./psycopg/cursor.h:80: error: parse error before '}' token ./psycopg/cursor.h:80: warning: data definition has no type or storage class ./psycopg/cursor.h:83: error: parse error before '*' token In file included from psycopg/psycopgmodule.c:32: ./psycopg/microprotocols.h:54: error: parse error before 'connectionObject' ./psycopg/microprotocols.h:57: error: parse error before '*' token psycopg/psycopgmodule.c:101: error: parse error before '*' token psycopg/psycopgmodule.c: In function '_psyco_connect_fill_exc': psycopg/psycopgmodule.c:104: error: 'conn' undeclared (first use in this function) psycopg/psycopgmodule.c:104: error: (Each undeclared identifier is reported only once psycopg/psycopgmodule.c:104: error: for each function it appears in.) psycopg/psycopgmodule.c: In function 'psyco_connect':
Re: Help installing Psycopg2 and/or MySQL-python on OS X
On Sun, 2007-09-02 at 16:04 -0700, Brandon Taylor wrote: > Hi everyone, > > I have Python 2.5.1 and Django installed and running on OS X 10.4.10, > but can't seem to get either the Psycopg2 or MySQL-python bindings > installed so I can actually use a database with Django. > > I have the latest version of PostgreSQL and MySQL5 installed and > running. Can someone please get me pointed in the right direction?! > > Many thanks in advance, > Brandon On my Mac, the main problem with Python is that I can't tell which version it's using. I assume you've tried downloading psycopg2 and running $ sudo python setup.py install from the terminal in the correct directory? If you have, what errors do you get? Todd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Help installing Psycopg2 and/or MySQL-python on OS X
Hi everyone, I have Python 2.5.1 and Django installed and running on OS X 10.4.10, but can't seem to get either the Psycopg2 or MySQL-python bindings installed so I can actually use a database with Django. I have the latest version of PostgreSQL and MySQL5 installed and running. Can someone please get me pointed in the right direction?! Many thanks in advance, Brandon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---