Opened 18 years ago
Closed 18 years ago
#4128 closed (duplicate)
Django 0.96 installation problem in Windows XP.
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Tools | Version: | 0.96 |
Severity: | Keywords: | Install problem, Django 0.96, Windows XP | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Hello good folks,
A short description - Django 0.96 does not install on Windows XP. The command "setup.py install" ( or "setup.py build" ) does not work... it gives the following error output:
running install running build running build_py error: package directory '\django' does not exist
I hacked around a bit and found the problem in the setup.py file. The original relevant portion is:
# Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] root_dir = os.path.dirname(__file__) len_root_dir = len(root_dir) django_dir = os.path.join(root_dir, 'django')
I reckoned that the "root directory" was not being recognised properly... so I made the following change:
# Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] root_dir = "C:\\Django-0.96\\Django-0.96\\" (NOTE: I manually added the 'root' directory pertinent to my system) len_root_dir = len(root_dir) django_dir = os.path.join(root_dir, 'django')
The above worked like magic without any hassles. So what's up guys, is this a bug or what? BTW, I had the latest installer tool :
setuptools-0.6c5-py2.5.exe installed in my system.
Thanks and Regards,
Timmy Jose (a.k.a z0ltan)
Change History (4)
comment:1 by , 18 years ago
Component: | Admin interface → Tools |
---|---|
Description: | modified (diff) |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 18 years ago
Description: | modified (diff) |
---|
comment:3 by , 18 years ago
comment:4 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
(Fixed up wiki-formatting in summary.)
Can you print out what the value of
__file__
is when you run setup.py? Just put in a print statement before the line that setsroot_dir
. I'm trying to work out if__file__
is not set correctly or ifos.path.dirname()
is returning the wrong thing.