Opened 8 years ago

Closed 6 years ago

Last modified 5 years ago

#4679 closed (worksforme)

django-admin.py maybe not in system path after setup.py installation on OS X

Reported by: paul@… Owned by: jacob
Component: Core (Management commands) Version: 1.0
Severity: Keywords: install
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Mac OS X 10.4.10 (Intel), Python 2.3.5 (#1, Aug 19 2006, 21:31:42)

Steps taken:

  1. Download Django 0.96 (http://www.djangoproject.com/download/0.96/tarball/) into /Users/pauldwaite/Desktop/
  1. Install Django, i.e. run these commands:
    cd ~/Desktop
    tar xzvf Django-0.96.tar.gz
    cd Django-0.96
    sudo python setup.py install
    
  1. Change into my home directory, and attempt to create a Django project:
    cd ../../
    django-admin.py startproject mysite
    

Result:

-bash: django-admin.py: command not found

Adding /Library/Python/2.3/site-packages/django/bin/ to my path (I do it in my .profile file) fixes the problem.

Change History (5)

comment:1 in reply to: ↑ description Changed 8 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I deleted Django, and installed Python 2.5.1 using the Mac OS X installer provided by python.org. This also fixes the problem.

comment:2 Changed 8 years ago by Simon G. <dev@…>

  • Resolution set to worksforme
  • Status changed from new to closed

Hmm.. is anyone else having the same issue? I've had no problems with a very similar setup.

comment:3 Changed 6 years ago by clay

  • Component changed from Documentation to django-admin.py
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 0.96 to 1.0

I have just run into this using Python 2.6 from MacPorts. setup.py installs django to:

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/bin/django-admin.py

django-admin.py is also not set executable during the install. Having to symlink and chmod django-admin.py after installing django is sort of a bummer.

comment:4 Changed 6 years ago by Alex

  • Resolution set to worksforme
  • Status changed from reopened to closed

If an installer doesn't install Django correctly we can't be reponsible for that, setup.py does the correct thing. If an installer has a bug it should be documented on the wiki distributions wikipage: http://code.djangoproject.com/wiki/Distributions

comment:5 Changed 5 years ago by rhand

Had the same problem with Snow Leopard 10.6.2. I installed Django using MacPorts. I added the PATH to ~/.Profile: export PATH=/opt/local/bin:opt/local/sbin:/opt/local/lib/python2.4/site-packages/django/bin:$PATH . Now django-admin.py works. Hope this will help others.

Note: See TracTickets for help on using tickets.
Back to Top