List Info

Thread: Macports and Django install problems




Macports and Django install problems
country flaguser name
United Kingdom
2007-09-17 05:30:11
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...

...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.


-----------------
The steps I took:

1.
Install Python 2.5 from the OS X binary at:
http://www.python.org/ftp/python/2.5.1/python-2.5.
1-macosx.dmg

End up with the following - good so far:
python -V:Python 2.5.1
which
python:/Library/Frameworks/Python.framework/Versions/Current
/ 
bin/python

The OS X package appears to have replaced Apple's Python 2.3
with  
2.5.1 successfully.

2.
Use Macports to install Django 0.96:
sudo port install py25-django-devel

Add the Macports path to my .bash_login (and remove
.profile):
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

End up with the following:
django-admin.py gives: (the expected screen of stuff)
but
 >>> import django gives: ImportError: No module
named django.


------------
The problem:

While installing Django, the Macports dependency thing also
installs  
Python 2.5 under /opt/local/lib/python2.5/

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.

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?


---------------
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. The Django site itself suggests
Macports,  
but fails to say that the install won't be where the OS X
Python  
expects it to be.

Dave Everitt

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Macports and Django install problems
country flaguser name
United States
2007-09-18 17:18:18
I am glad your doing this, but...

I wish Leopard would ship with Django or there was a tool to
install.  
I know Ruby on Rails is there. Already for, Ruby on Rails,
there is a  
program called Locomotive <http://locomotive.r
aaum.org/>.  Have not  
tried this, but, (you see where I am getting) we need an
installer/ 
monitor for Django on OSX.

Documentation is great. I also encourage/applaud this,
regardless.  
However we need a installer/montitor app for Django
development on on  
OSX. Does anyone know if one already exists or has been
started?  I  
would consider helping.

Brian Ray
braysent.com
http://kazavoo.com/blog


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Macports and Django install problems
country flaguser name
United States
2007-09-18 17:52:45
In article <77FBD535-B3D8-4A23-8D0D-86A39804C152innotts.co.uk>,
 Dave Everitt <deverittinnotts.co.uk> 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...
> 
> ...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.
> 
> 
> -----------------
> The steps I took:
> 
> 1.
> Install Python 2.5 from the OS X binary at:
> http://www.python.org/ftp/python/2.5.1/python-2.5.
1-macosx.dmg
> 
> End up with the following - good so far:
> python -V:Python 2.5.1
> which
python:/Library/Frameworks/Python.framework/Versions/Current
/ 
> bin/python
> 
> The OS X package appears to have replaced Apple's
Python 2.3 with  
> 2.5.1 successfully.

Just to be clear, installing 2.5.1 this way does not replace
Apple's 
2.3, it adds another version, albeit in a different
location.
 
> 2.
> Use Macports to install Django 0.96:
> sudo port install py25-django-devel
> 
> Add the Macports path to my .bash_login (and remove
.profile):
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> 
> End up with the following:
> django-admin.py gives: (the expected screen of stuff)
> but
>  >>> import django gives: ImportError: No
module named django.
> 
> 
> ------------
> The problem:
> 
> While installing Django, the Macports dependency thing
also installs  
> Python 2.5 under /opt/local/lib/python2.5/
> 
> 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.
> 
> 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?

Actually you now have at least 3 versions of Python
installed:

1. the Apple 2.3 version at
/System/Library/Frameworks/Python.framework
2. the "official"  python.org 2.5.1 version at 
/Library/Frameworks/Python.framework
3. the MacPorts 2.5.1 version built by the port command at 
/opt/local/lib/python2.5

All 3 can happily co-exist with each other, btw.  In all
depends on 
which version of the python interpreter you start.  For
example:

/usr/bin/python2.3
/usr/local/bin/python2.5
/opt/local/bin/python2.5

Of course, you need only one of the two 2.5.1's, not both. 
(Do not try 
de-installing the Apple 2.3 one.  That is the only one that
might be 
touched by OS X updates.)  I'm feeling a bit lazy to try it
all again 
from scratch but I'd suggest forgetting about MacPorts for
this.  For 
most users, it should be much simpler to stick to the
"official" 2.5.1 
version, then getting setuptools installed, and then using
easy_install 
to install Django and additional site packages needed.  I
believe you 
*should* be able to download and install Django directly
with 
easy_install with a properly configured setuptools started
from the 
correct python.

Good luck and thanks for helping to document this better.

-- 
 Ned Deily,
 nadacm.org

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Macports and Django install problems
country flaguser name
Germany
2007-09-19 16:28:01
Am 2007-09-19 um 00:18 schrieb Brian Ray:

> However we need a installer/montitor app for Django
development on on
> OSX. Does anyone know if one already exists or has been
started?  I
> would consider helping.

There is one great installer for django and a lot of other
projects,  
and every developer should know it:
It's called subversion, svn for short... 
Works great for me!
(Hint: Collect your checkouts in a shell script and call
that daily  
with cron.)

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org
(I'm an assurer)


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Macports and Django install problems
country flaguser name
United States
2007-09-30 11:40:39
On Sep 19, 2007, at 6:53 AM, Dave Everitt wrote:

> The idea is for it to be completely accessible to
beginners (i.e.  
> those who may not even know how to cd in Terminal).
>

I think we need to do for Python and Django, what Marc
Liyanage did  
for PHP on OSX.

>> Does anyone know if one already exists or has been
started?  I  
>> would consider helping.
>
> I can't contribute to the code, but might be able to
help polish  
> things up somehow.

Accepted. I was sort of hoping someone else would take the
lead on  
this.  I guess I will be forced to. I am a little surprised
something  
is not started already.

I just made the project iDjango.

<http://code.goo
gle.com/p/idjango/>

My intention here is to do something really simple, quick,
and with  
minimal functionality. I see no reason why it can't do an
automated  
checkout from svn.

Any volunteers to help? I may also ping the Django list.

Brian Ray
braysent.com
http://kazavoo.com/blog
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )