Import error cannot import name execute_manager in windows environment

execute_manager deprecated in Django 1.4 as part of the project layout refactor and was removed in 1.6 per the deprecation timeline: https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3 To fix this error you should either install a compatible version of Django for the project or update the manage.py to new style which does not use execute_manager: https://docs.djangoproject.com/en/stable/releases/1.4/#updated-default-project-layout-and-manage-py Most likely if your … Read more

Virtualenv uses wrong python, even though it is first in $PATH

My problem was that i recently moved my project with virtualenv to another location, due to this activate script had wrong VIRTUAL_ENV path. $ cat path_to_your_env/bin/activate … # some declarations VIRTUAL_ENV=”/path_to_your_env/bin/python” # <– THIS LINE export VIRTUAL_ENV … # some declarations To fix this, just update VIRTUAL_ENV in activate script. Also you maybe need to … Read more

Terminal: Where is the shell start-up file?

You’re probably using bash so just add these 3 lines to ~/.bash_profile: $ cat >> ~/.bash_profile export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/directory-you-do-development-in source /usr/local/bin/virtualenvwrapper.sh ^D where ^D means you type Control+D (EOF). Then either close your terminal window and open a new one, or you can “reload” your .bash_profile like this: $ source ~/.bash_profile

How do I change the default virtualenv prompt?

If you are working on a custom PS1 (as I when found out this issue), I recommend you to disable prompt change, use export VIRTUAL_ENV_DISABLE_PROMPT=1 (see virtualenv docs), and make your own virtualenv prompt in order to add to your PS1. See this snippet that I’ve used: function virtualenv_info(){ # Get Virtual Env if [[ … Read more

List all virtualenv created by virtualenvwrapper

You can use the lsvirtualenv, in which you have two options “long” or “brief”: “long” option is the default one, it searches for any hook you may have around this command and executes it, which takes more time. “brief” just take the virtualenvs names and prints it. brief usage: $ lsvirtualenv -b long usage: $ … Read more

tech