Re: Macports Django install - which way?
> We're always open to documentation improvements; thanks for offering to help. The latest version (under revision before becoming HTML) of my 'absurdly simple' try-Django-locally for OS X is here: ecoconsulting.co.uk/python/django-install.txt > If you're installing from a downloaded version of Django (rather than > macports) > The standard 'python setup.py install' will work, and will install > Django into the site-packages of whichever python install is on the > path at the time. I did a CL install in the end, and all is well. > Personally, I find Macports to be a very useful way of getting the > support libraries in place... Agreed, but it's an extra layer of complexity for me at this stage. > I use an svn checkout of Django rather > than the ports version. I used 0.96, not confident enough for the svn, but may use in future. SQLite is already on OS X, that's enough for trying/learning. I have MySQL too. > As a guideline, this is what is in my .profile: > export PATH=/opt/local/bin:/opt/local/sbin:$PATH > export PATH=/opt/local/lib/pgsql8/bin:$PATH > export PATH=/opt/local/lib/python2.4/site-packages/django/bin:$PATH > export > PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin:$PATH Now that's really helpful - thanks. I may use Macports in future. > > I know OS X needs Python elswhere > > Define 'needs'. OS X provides Python, but doesn't really use it at a > core level. I did read that some (3rd party?) OS X apps use the original Python, but no problems so far - the 2.5 installer left the 2.3 version intact. > The bigger problem is coming up with an easy answer for 'how to > install Postgres' (or any other database). [...] 'port > install py-psycopg2' and setting up a few paths is much easier. Agreed. But in this case I'm deliberately simplifying the setup for trying out Django in a local environment, and just using SQLite (already on OS X). > If you find (or know of) a good set of Postgres/MySQL binaries for OSX > (including Python bindings), this problem goes away. However, I > haven't been able to find such a beast. When I get to the development stage, if I find one I'll post it up here :-) >> --- > > Macports is a good idea [...] > > but the Python it installs isn't in the place OS X expects it to be, > > so can't be used easily. > > Depends on your definition of easily. I can't say I had much > difficulty setting up my .profile, but I'm coming from a unix > background, so I'm used to that sort of thing. Again, another layer of complexity that I wanted to remove at this stage. I may well return to Macports when I have more time - I like the concept. But my tutorial is for people without much Unix experience (mine? Minimal Solaris 8 years ago, plus whatever FreeBSD I need in OS X) who want to try out Django with the minimum barriers to getting it running on OS X. When I get into a real site, I'll document that too and get feedback on it. The problem with many of the current guides and some of the documentation is that it presumes some Unix experience, and covers too much ground for those who just want to dip their toe in the Django waters, so that's what I'm trying to remedy. I'm actually aiming to lure web designers, who want to move towards web development, away from proprietary or messy or solutions to which web designers tend to default (like mixing up PHP and HTML too much). Many thanks for the advice, Dave --~--~-~--~~~---~--~~ 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: Macports Django install - which way?
On 9/17/07, Dave E <[EMAIL PROTECTED]> wrote: > > After reading about other OS X user's Django install problems, I'm > attempting to write up the simplest, clearest possible, completely > unambiguous, instructions for other OS X users here: > http:ecoconsulting.co.uk/python/django-install.txt > but obviously I need to get it right first, and... We're always open to documentation improvements; thanks for offering to help. > ...I've hit problems with Macports, detailed below. But I can't find > anywhere how to install Django from within Python (like Perl's CPAN), > and Macports is actually suggested on the Django site. If you're installing from a downloaded version of Django (rather than macports) The standard 'python setup.py install' will work, and will install Django into the site-packages of whichever python install is on the path at the time. Macports is listed as one of the 'prepackaged installations' that may be helpful if you're on a Mac. However, its not the only way to go. Personally, I find Macports to be a very useful way of getting the support libraries in place - in particular, Postgres, which doesn't provide native Mac installers. I use an svn checkout of Django rather than the ports version. The instructions you provide will depend on how you satisfy your dependencies. Ultimately, you will need to install: 1) Python 2) A database 3) A database Python library 4) Django code. Macports can be used to provide any of these; personally, I use Macports to provide 1-3. As a guideline, this is what is in my .profile: export PATH=/opt/local/bin:/opt/local/sbin:$PATH export PATH=/opt/local/lib/pgsql8/bin:$PATH export PATH=/opt/local/lib/python2.4/site-packages/django/bin:$PATH export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin:$PATH > I know OS X needs Python elswhere (and I now appear to have 2 Pythons) > but the running one doesn't have Django in its 'site-packages' dir. Define 'needs'. OS X provides Python, but doesn't really use it at a core level. It's not tightly bound to the OS or anything - it's just there to fill the promise that OSX is 'based on Unix'. > Looks like I might have to forget Macports and install Django manually > under the OS X Python (or copy it across), but will this risk being > mangled by OS X updates? And is there an easy Python 'install django' > command? As before - yes; python setup.py install in the Django directory. The bigger problem is coming up with an easy answer for 'how to install Postgres' (or any other database). The Apple knowledge base on setting Postgres starts with 'download the Postgres source tarball', which isn't a particularly attractive option to me. Then you need to deal with compiling the psycopg backends, etc. For my money, 'port install py-psycopg2' and setting up a few paths is much easier. If you find (or know of) a good set of Postgres/MySQL binaries for OSX (including Python bindings), this problem goes away. However, I haven't been able to find such a beast. > --- > About Macports: > > Macports is a good idea (easy installs and updates, preserves Apple > stuff, keeps new stuff separate from getting mashed by Apple updates) > but the Python it installs isn't in the place OS X expects it to be, > so can't be used easily. Depends on your definition of easily. I can't say I had much difficulty setting up my .profile, but I'm coming from a unix background, so I'm used to that sort of thing. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ 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: Macports Django install - which way?
On 17-Sep-07, at 4:12 PM, Dave E wrote: > After reading about other OS X user's Django install problems, I'm > attempting to write up the simplest, clearest possible, completely > unambiguous, instructions for other OS X users here: > http:ecoconsulting.co.uk/python/django-install.txt > but obviously I need to get it right first, and... first comment: please do something with wordwrap - in firefox on a mac, I have to keep scrolling left and right > > ...I've hit problems with Macports, detailed below. But I can't find > anywhere how to install Django from within Python (like Perl's CPAN), > and Macports is actually suggested on the Django site. second comment: MacOS is just a BSD - so the installation is just as straightforward as an installation on Linux except that some paths are slightly different. third: you havent touched the database installation part. and, finally, it is best to run django from the latest svn, so just following the basic linux installation instructions for django from the tutorial would be the ideal way of installing django on a Mac. If you *do* install django from Macports, you have no control over the version you are using. So for the django part - just an svn co and a symlink to the python site-packages directory is all you need. -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---