ImportError: No module named urlparse

2,044 views
Skip to first unread message

Sergey Kostin

unread,
Aug 23, 2013, 4:48:29 PM8/23/13
to django-so...@googlegroups.com
Sorry my English

First of all I tried to lounch this application on virtualenv with 3.2 and I have this error:

ImportError: No module named urlparse


After that I tried to lounch it on python 2.7 but problem is still the same:


No module named urlparse
Request Method: GET
Request URL: http://blogondjango.com/
Django Version: 1.5.2
Exception Type: ImportError
Exception Value:
No module named urlparse
Exception Location: /www/django/django-social-auth-master/social_auth/utils.py in <module>, line 4
Python Executable: /usr/bin/python
Python Version: 3.2.3
Python Path:
['/www/django/django-social-auth-master',
 '/www/django/django-social-auth-master/example',
 '/www/django/django-social-auth-master/example/example',
 '/virtualenvs/blog/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg',
 '/virtualenvs/blog/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
 '/usr/bin/python3',
 '/usr/lib/python3.2',
 '/usr/lib/python3.2/plat-linux2',
 '/usr/lib/python3.2/lib-dynload',
 '/usr/local/lib/python3.2/dist-packages',
 '/usr/lib/python3/dist-packages',
 '/virtualenvs/blog/lib/python2.7/site-packages']



Matías Aguirre

unread,
Aug 23, 2013, 5:29:43 PM8/23/13
to django-social-auth
This lib doesn't support Python 3, you could try python-social-auth instead
which does.

Excerpts from Sergey Kostin's message of 2013-08-23 17:48:29 -0300:
--
Matías Aguirre (matias...@gmail.com)

Sergey Kostin

unread,
Aug 24, 2013, 5:30:24 AM8/24/13
to django-so...@googlegroups.com
Matias, thank you.

I am novice in python, linux, virtualenvs and django at all. I create special virtualenv with python 2.7 and specify sites-packages in wsgi.py:

site.addsitedir('/virtualenvs/blog/lib/python2.7/site-packages')

also I add a comment with my virtualenv in the top of document :  #!/virtualenvs/blog/bin python

But project still runs on python 3.2 My project not added into the virtualenv I crate special packages for projects and virtualenvs. How I can use the virtualenv in this situation? Or I just should restart my project in the virtualenv packages?

Reply all
Reply to author
Forward
0 new messages