virtualenvwrapper

Where should virtualenvs be created?

佐手、 提交于 2019-11-27 16:54:25
I'm confused as to where I should put my virtualenvs. With my first django project, I created the project with the command django-admin.py startproject djangoproject I then cd'd into the djangoproject directory and ran the command virtualenv env which created the virtual environment directory at the same level as the inner djangoproject directory. Is this the wrong place in which to create the virtualenv for this particular project? I'm getting the impression that most people keep all their virtualenvs together in an entirely different directory, e.g. ~/virtualenvs , and then use

How to force virtualenv to install latest setuptools and pip from pypi?

强颜欢笑 提交于 2019-11-27 15:51:27
问题 Is it possible to force virtualenv to use the latest setuptools and pip available from pypi? Essentially, I'm looking for the opposite of the --never-download flag. Currently, when I make a new virtualenv, it uses the local (old) versions that come bundled with virtualenv. $ v.mk testvenv New python executable in testvenv/bin/python Installing setuptools............done. Installing pip...............done. $ pip show setuptools --- Name: setuptools Version: 0.6c11 Location: /Users/cwilson/

Python Virtualenv - No module named virtualenvwrapper.hook_loader

一笑奈何 提交于 2019-11-27 10:27:09
I'm running Mac OS 10.6.8. and wanted to install in addition to python 2.6 also python 2.7 and use python 2.7 in a new virtualenv. I executed the following steps: I downloaded python 2.7 and installed it: http://www.python.org/ftp/python/2.7.3/python-2.7.3-macosx10.6.dmg Then I run the command to setup a new virtualenv using python2.7: mkvirtualenv --python=python2.7 mynewenv My .bash_profile looks like the following: # needed for virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin

How to set virtualenv for a crontab?

你。 提交于 2019-11-27 09:20:58
问题 I want to set up a crontab to run a Python script. Say the script is something like: #!/usr/bin/python print "hello world" Is there a way I could specify a virtualenv for that Python script to run in? In shell I'd just do: ~$ workon myenv Is there something equivalent I could do in crontab to activate a virtualenv? 回答1: If you're using "workon" you're actually using "virtualenv wrapper" which is another layer of abstraction that sits on top of virtualenv. virtualenv alone can be activated by

bash: mkvirtualenv: command not found

谁说我不能喝 提交于 2019-11-27 09:17:02
问题 After following the instructions on Doug Hellman's virtualenvwrapper post, I still could not fire up a test environment. [mpenning@tsunami ~]$ mkvirtualenv test -bash: mkvirtualenv: command not found [mpenning@tsunami ~]$ It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in the virtualenvwrapper installation docs, but it does not exist. I'm running CentOS 6 and python 2.6.6, if this matters. # File: ~/.bash

Where is virtualenvwrapper.sh after pip install?

和自甴很熟 提交于 2019-11-27 09:08:20
问题 I'm trying to setup virtualenvwrapper on OSX, and all the instructions and tutorials I've found tell me to add a source command to .profile, pointing towards virtualenvwrapper.sh. I've checked all the python and site-packages directories, and I can't find any virtualenvwrapper.sh. Is this something I need to download separately? Is pip not installing correctly? This is the contents of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenvwrapper: hook_loader

pip - Requirement already satisfied?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 05:47:59
问题 pip recognize global installed packages..?! :-( I've used virtualenvwrapper preactivate hook to clean PYTHONPATH, export PYTHONPATH="" then echo $PYTHONPATH returns empty string, but this didn't help. What's wrong? bentzy@lama:~$ mkvirtualenv test New python executable in test/bin/python Installing setuptools............done. Installing pip...............done. virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/predeactivate virtualenvwrapper.user_scripts creating /home

How do I remove/delete a virtualenv?

陌路散爱 提交于 2019-11-27 04:55:25
问题 I created an environment with the following command: virtualenv venv --distribute I cannot remove it with the following command: rmvirtualenv venv - This is part of virtualenvwrapper as mentioned in answer below for virtualenvwrapper I do an ls on my current directory and I still see venv The only way I can remove it seems to be: sudo rm -rf venv Note that the environment is not active. I'm running Ubuntu 11.10. Any ideas? I've tried rebooting my system to no avail. 回答1: That's it! There is

How to use virtualenvwrapper in Supervisor?

家住魔仙堡 提交于 2019-11-27 02:36:41
问题 When I was developing and testing my project, I used to use virtualenvwrapper to manage the environment and run it: workon myproject python myproject.py Of course, once I was in the right virtualenv, I was using the right version of Python, and other corresponding libraries for running my project. Now, I want to use Supervisord to manage the same project as it is ready for deployment. The question is what is the proper way to tell Supervisord to activate the right virtualenv before executing

How to leave/exit/deactivate a Python virtualenv

我的未来我决定 提交于 2019-11-27 02:19:49
I'm using virtualenv and the virtualenvwrapper. I can switch between virtualenv's just fine using the workon command. me@mymachine:~$ workon env1 (env1)me@mymachine:~$ workon env2 (env2)me@mymachine:~$ workon env1 (env1)me@mymachine:~$ However, how do I exit all virtual machines and workon my real machine again? Right now, the only way I have of getting back to me@mymachine:~$ is to exit the shell and start a new one. That's kind of annoying. Is there a command to workon "nothing", and if so, what is it? If such a command does not exist, how would I go about creating it? Usually, activating a