Installing Django 1.0.2...

17 views
Skip to first unread message

mic

unread,
Dec 31, 2008, 3:36:51 AM12/31/08
to Django users
I am a first time python/django user....

running "python setup.py install" gives me this error

Traceback (most recent call last):
File "setup.py", line 69, in <module>
version = __import__('django').get_version()
File "C:\Django-1.0.2-final\django\__init__.py", line 13, in
get_version
from django.utils.version import get_svn_revision
ImportError: No module named utils.version

Any help is appreciated.

Thanks for the help.

Madhav

mic

unread,
Dec 31, 2008, 3:46:00 AM12/31/08
to Django users
I am a first time python/django user..

Running "python setup.py install" from django-1.0.2-final directory
gives me this error

Traceback (most recent call last):
File "setup.py", line 69, in <module>
version = __import__('django').get_version()
File "C:\Django-1.0.2-final\django\__init__.py", line 13, in
get_version
from django.utils.version import get_svn_revision
ImportError: No module named utils.version

Any ideas on what I am missing?

Thanks

Mic

Karen Tracey

unread,
Dec 31, 2008, 9:14:42 AM12/31/08
to django...@googlegroups.com

That's odd. Do you have the files:
 
C:\Django-1.0.2-final\django\utils\__init__.py
C:\Django-1.0.2-final\django\utils\version.py

If not, something has gone wrong with unpacking the 1.0.2 tarfile because those files are in it. 

If you do have those files, what version of Python are you using?

Karen

Peter

unread,
Dec 31, 2008, 9:20:52 AM12/31/08
to Django users
Python cannot find django/utils/version.py. Usually everything needed
for
to run django (which is everything in the 'django' folder) is put
under the folder 'site-packages'
in your pythin installation. AFAIK simply copying C:\Django-1.0.2-final
\django to site-packages\django
should work.

-- Peter

Karen Tracey

unread,
Dec 31, 2008, 9:26:12 AM12/31/08
to django...@googlegroups.com
On Wed, Dec 31, 2008 at 9:20 AM, Peter <pe...@monicol.co.uk> wrote:

Python cannot find django/utils/version.py. Usually everything needed
for
to run django (which is everything in the 'django' folder) is put
under the folder 'site-packages'
in your pythin installation. AFAIK simply copying C:\Django-1.0.2-final
\django to site-packages\django
should work.

The command that is failing here is "python setup.py install".  It should not be necessary to copy anything to site-packages prior to running the install command.

Karen

Jay

unread,
Jan 6, 2009, 7:16:01 AM1/6/09
to Django users
Karen, thanks for your comments, you are right.
However, it turns out that the file "...\Django-1.0.2-final\django
\utils\__init__.py" has size 0, and it seems when using winzip ( I
just realized why 7-zip may have been required for unzipping), the 0
size file is *not* written out. In fact "viewing" the file causes an
error (at least on my version winzip 7.0 SR-1). The simple work around
is to create an empty file named __init__.py in "...\Django-1.0.2-final
\django\utils".

Now the command "setup.py install" works just fine.

Jay

On Dec 31 2008, 9:14 am, "Karen Tracey" <kmtra...@gmail.com> wrote:

Karen Tracey

unread,
Jan 6, 2009, 12:11:11 PM1/6/09
to django...@googlegroups.com
On Tue, Jan 6, 2009 at 7:16 AM, Jay <jke...@gmail.com> wrote:

Karen, thanks for your comments, you are right.
However, it turns out that the file "...\Django-1.0.2-final\django
\utils\__init__.py" has size 0, and it seems when using winzip ( I
just realized why 7-zip may have been required for unzipping), the 0
size file is *not*  written out. In fact "viewing" the file causes an
error (at least on my version winzip 7.0 SR-1). The simple work around
is to create an empty file named __init__.py in "...\Django-1.0.2-final
\django\utils".

Now the command "setup.py install" works just fine.

Be aware there are many more 0-byte __init__.py files in the django tarball.  Any tool that doesn't correctly extract them is probably not something you want to be using.  These files are common in any Python-based project.

Karen

mic

unread,
Jan 31, 2009, 7:05:21 PM1/31/09
to Django users
hi Karen,

>> That's odd. Do you have the files:

>> C:\Django-1.0.2-final\django\utils\__init__.py
>> C:\Django-1.0.2-final\django\utils\version.py

I have the following structure...

C:\Django-1.0.2-final\django\__init__.py
C:\Django-1.0.2-final\django\utils\version.py

Can't figure out why this is not working

On Jan 6, 9:11 am, "Karen Tracey" <kmtra...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages