This issue is something to do with your Python version. Uninstall Python 
and install Python 2.7.8 instead of 2.7.7 as it seems there are issues with 
it.

Chris

On Tuesday, May 26, 2015 at 1:06:07 AM UTC-5, Shashwat singh wrote:
>
> Django is properly installed but when i run, django-admin.py it returns 
> the following error.
>
> Traceback (most recent call last):
>   File "/usr/local/bin/django-admin.py", line 5, in <module>
>     management.execute_from_command_line()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 338, in execute_from_command_line
>     utility.execute()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 312, in execute
>     django.setup()
>   File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 
> 15, in setup
>     from django.utils.log import configure_logging
>   File "/usr/local/lib/python2.7/site-packages/django/utils/log.py", line 
> 16, in <module>
>     from django.views.debug import ExceptionReporter, 
> get_exception_reporter_filter
>   File "/usr/local/lib/python2.7/site-packages/django/views/debug.py", 
> line 9, in <module>
>     from django.core.urlresolvers import Resolver404, resolve
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 
> 18, in <module>
>     from django.http import Http404
>   File "/usr/local/lib/python2.7/site-packages/django/http/__init__.py", 
> line 2, in <module>
>     from django.http.request import (HttpRequest, QueryDict,
>   File "/usr/local/lib/python2.7/site-packages/django/http/request.py", 
> line 12, in <module>
>     from django.core import signing
>   File "/usr/local/lib/python2.7/site-packages/django/core/signing.py", 
> line 46, in <module>
>     from django.utils.crypto import constant_time_compare, salted_hmac
>   File "/usr/local/lib/python2.7/site-packages/django/utils/crypto.py", 
> line 8, in <module>
>     import hmac
>   File 
> "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hmac.py",
>  
> line 8, in <module>
>     from operator import _compare_digest as compare_digest
> ImportError: cannot import name _compare_digest
>
> And here is my python path - when i ran echo $PATH:
>
>
> /Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin
>
>
>
> Please help. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce6e2d8d-3fb1-4937-912d-53bce11864a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to