python virtual environment

93 views
Skip to first unread message

tino

unread,
Nov 29, 2013, 12:44:13 PM11/29/13
to django...@googlegroups.com


Hello

I am trying to run a project that was setup in another server, but getting the following error. I am using python 2.7, django, virtualenv. So I am running the project inside a python virtual environment


(virtualenv)[web.srv1 daily# python manage.py runserver 0.0.0.0:8000
Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: cannot import name execute_manager


I used the method mentioned in the below link to setup the virtual environment.

http://toic.org/blog/2011/wsgi-on-cpanel-improved/

This project was setup inside a cpanel server. But the current server I using is not a cpanel server. It is normal centos server.

Can somebody help me to track down the issue.


Avraham Serour

unread,
Nov 30, 2013, 9:13:28 PM11/30/13
to django...@googlegroups.com
you need to activate the virtualenv before using:
on windows:
env\Scripts\activate
on linux:
source env/bin/activate


--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7181ba64-d2d6-4926-b35d-5b4a2a7792a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Paul Whipp

unread,
Dec 1, 2013, 7:34:18 PM12/1/13
to django...@googlegroups.com
Looks like you already have an active virtual environment but those instructions only install a few default things (like Django) into that environment.

Therefore it sounds like your new virtual environment does not have all of the required python modules installed in it.

There should be a requirements.txt file or similar associated with the project which you can use for the purpose with pip. See here for more info.

Timothy W. Cook

unread,
Dec 2, 2013, 3:41:33 AM12/2/13
to django...@googlegroups.com
On Fri, Nov 29, 2013 at 3:44 PM, tino <tin...@gmail.com> wrote:
>
>
> Hello
>
> I am trying to run a project that was setup in another server, but getting
> the following error. I am using python 2.7, django, virtualenv. So I am
> running the project inside a python virtual environment
>
>
> (virtualenv)[web.srv1 daily# python manage.py runserver 0.0.0.0:8000
> Traceback (most recent call last):
> File "manage.py", line 2, in <module>
> from django.core.management import execute_manager
> ImportError: cannot import name execute_manager
>
>

Which version of Django did you install?

See: http://goo.gl/Q87gpR

HTH,
Tim

Vibhu Rishi

unread,
Dec 5, 2013, 11:09:09 AM12/5/13
to django...@googlegroups.com
I am getting the same error when I did an upgrade of Django to 1.6 . Reverted back to 1.5 and it seems to work, but i am still searching for a solution for this to work with 1.6

V.


--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7181ba64-d2d6-4926-b35d-5b4a2a7792a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

Timothy W. Cook

unread,
Dec 5, 2013, 11:28:33 AM12/5/13
to django...@googlegroups.com
On Thu, Dec 5, 2013 at 2:09 PM, Vibhu Rishi <vibhu...@gmail.com> wrote:
I am getting the same error when I did an upgrade of Django to 1.6 . Reverted back to 1.5 and it seems to work, but i am still searching for a solution for this to work with 1.6

V.

execute_manager was deprecated:

and probably removed in 1.6

HTH,

--Tim
 

For more options, visit https://groups.google.com/groups/opt_out.



--
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc           +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

Vibhu Rishi

unread,
Dec 5, 2013, 11:34:57 AM12/5/13
to django...@googlegroups.com
so, for an existing project, how do i update the manage.py file ? create a new project in 1.6 and copy it over ?

V.



For more options, visit https://groups.google.com/groups/opt_out.

mulianto

unread,
Dec 5, 2013, 1:15:49 PM12/5/13
to django...@googlegroups.com
Hi,

You can use the new manage.py in django 1.6 doc , or you generate a new project, then copy it to your existing project.

I have this error also when i try my django1.3 project in django1.6 in virtenv.

Hope helps,

Regards,
Mulianto

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages