Rob,

See http://docs.python.org/install/index.html#alternate-installation

You may want the "home" scheme, but there's a lot of interesting
information there.  I don't know if you have to have created the
corresponding subdirectories (e.g.; ~/lib/python2.6/site-packages)
or not, nor whether the directory structure is different on the Mac.

Note that once you make things install there you will need to add
it's site-packages subdir to the python path.  The same documentation
describes your  options for this a bit further down.

Do not use sudo when installing to your home directory heirarchy,
you already have permissions there, and you probably want to
own the files that get installed.

Rather than here, you should try this question on a python list,
especially if you can find one focused on the Mac.  I also happen
to know that the moderator of the python tutor list uses (or used)
a Mac, and he's way smarter than me.

But really, the better way to do this kind of stuff is probably virtualenv.

Bill

On Tue, Apr 27, 2010 at 4:38 AM, Rob <rob.nikan...@gmail.com> wrote:
>
> Thanks, but none of those suggestions seem to work.  I'm not going to
> worry about this since I've got too many other things to do, (plus I'm
> in China and so to read a google group I have to use a proxy/tunnel),
> but for the record here's some more info...
>
> I think I'm using the system python...
>
> RobsMac-2 Django-1.1.1 $ which python
> /Library/Frameworks/Python.framework/Versions/2.6/bin/python
>
> --prefix is having no effect, but I'm not sure what to set it to given
> the OS X directories...
>
> RobsMac-2 Django-1.1.1 $ sudo python setup.py install --prefix=/
> Library/Frameworks/Python.framework/Versions/2.6
> running install
> ...
> Removing /Users/rob/Library/Python/2.6/site-packages/Django-1.1.1-
> py2.6.egg-info
> Writing /Users/rob/Library/Python/2.6/site-packages/Django-1.1.1-
> py2.6.egg-info
>
> So it put in my home dir.  Same with --prefix=/Library/Python/2.6.
>
> Using --install-base does produce this error...
>
> RobsMac-2 Django-1.1.1 $ sudo python setup.py install --install-base=/
> Library/Python/2.6
> running install
> error: install-base or install-platbase supplied, but installation
> scheme is incomplete
>
> PYTHONPATH is nothing.
>
>
> Rob
>
>
> On Apr 26, 11:22 pm, Bill Freeman <ke1g...@gmail.com> wrote:
>> Are you running setup using the system python, or a separate one tied
>> to your account (such as in a virtual env)?  If the latter then try 
>> specifying
>> the full path to the system python to run setup.  Also, if you have the
>> PYTHONPATH environment variable set, you might try unsetting it while
>> running the install.  (You can do this in a subshell and not affect other
>> operations.)
>>
>> Bill
>>
>>
>>
>> On Sat, Apr 24, 2010 at 9:36 AM, pjmorse <flashesofpa...@gmail.com> wrote:
>> > On Apr 24, 3:03 am, Rob <rob.nikan...@gmail.com> wrote:
>> >> Maybe this is more of a general python question, but when I run `sudo
>> >> python setup.py install` it insists on putting the django package in ~/
>> >> Library/Python/2.6/site-packages.  I want to install it in the system
>> >> site-packages, so it get's picked up by apache and mod_wsgi.  For now
>> >> I'll hand copy the files, but there must be a way with setup.py.  ?
>>
>> > Try the --prefix or --install-base options to `setup.py install`.
>> > `python setup.py install --help` will run down the options for you; I
>> > think --prefix=/Library/Python/2.6/site-packages/ is worth a shot?
>>
>> > pjm
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/django-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group 
>> athttp://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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

Reply via email to