virtualenvwrapper

How to create a virtualenv by cloning the current local environment?

不问归期 提交于 2019-12-01 16:18:43
Suppose I have a python interpreter with many modules installed on my local system, and it has been tuned to just work. Now I want to create a virtualenv to freeze these, so that they won't be broke by upgrading in the future. How can I make it? Thanks. I can't use pip freeze , because that's a cluster on which there's no pip and I don't have the privileges to install it. And I don't want the reinstall the modules either, I'm looking for that whether there's a cloning way. Run pip freeze to create a list of all modules currently installed on the system. Then make a virtualenv and install these

virtualenvwrapper seemingly ignoring VIRTUALENVWRAPPER_PYTHON

こ雲淡風輕ζ 提交于 2019-12-01 14:17:59
I am python / virtualenv n00b, and tried to follow the instructions for installing virtualenv / virtualenvwrapper.sh. I installed both virtualenv and virtualenvwrapper.sh via: pip install virtualenv pip install virtualenvwrapper I have python3.5 and python2.7 installed on my system (Mac OS X El Capitan 10.11.4) When I search for python, python3, virtualenv and virtualenvwrapper.sh via bash I get the following: which python ==> /usr/local/bin/python which python3 ==> /usr/local/bin/python3 which virtualenv ==> /usr/local/bin/virtualenv which virtualenvwrapper.sh ==> /usr/local/bin

ERROR virtualenvwrapper in GitBash

£可爱£侵袭症+ 提交于 2019-12-01 07:01:50
I trying to setup virtualenvwrapper in GitBash (Windows 7). I write the next lines: 1 $ export WORKON_HOME=$HOME/.virtualenvs 2 $ export MSYS_HOME=/c/msys/1.0 3 $ source /usr/local/bin/virtualenvwrapper.sh And the last line give me an error: source /usr/local/bin/virtualenvwrapper.sh sh.exe: /usr/local/bin/virtualenvwrapper.sh: No such file or directory I find, where on my drive is virtualenvwrapper.sh and change directory name. On my computer it's /c/Python27/Scripts/virtualenvwrapper.sh . When I again run command $source /c/Python27/Scripts/virtualenvwrapper.sh I get the next ERROR message:

Modifying a virtualenv so that packages installed in global site-packages are available [duplicate]

流过昼夜 提交于 2019-11-30 12:52:10
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Revert the `--no-site-packages` option with virtualenv I've created a virtual environment using the virtualenvwrapper documentation as follows: $ pip install virtualenvwrapper $ export WORKON_HOME=~/Envs $ mkdir -p $WORKON_HOME $ source /usr/local/bin/virtualenvwrapper.sh $ mkvirtualenv env1 It works fine for the most part, but I've run into a few Django issues that require me to install some global packages

How to check whether virtualenv was created with '--no-site-packages'?

♀尐吖头ヾ 提交于 2019-11-30 08:20:08
Sometimes I get errors that I suspect are the result of my Django app using globally installed Python modules/Django apps instead of those within its virtualenv. Is there a way to check whether my app's virtualenv was created with '--no-site-packages' without having to delete it, then re-create it as follows? deactivate rmvirtualenv my_env mkvirtualenv my_env --no-site-packages workon my_env pip install -r requirements.txt Surely there must be a better way! Thanks. There's a file in <env>/lib/pythonX.X/ called no-global-site-packages.txt when you create a virtual environment with --no-site

Why I am suddenly seeing `Usage: source deactivate` whenever I run virtualenvwrapper commands?

醉酒当歌 提交于 2019-11-30 08:12:55
I never used to see this message before when using virtualenvwrapper, but now I'm suddenly seeing this message whenever I run, say, mkvirtualenv <environment> or workon <environment> : Usage: source deactivate removes the 'bin' directory of the environment activated with 'source activate' from PATH. I haven't modified virtualenvwrapper at all, and a quick google search only yields this GitHub issue -- I did install IPython/Anaconda a while back, but I'm not sure how it might be interfering with virtualenvwrapper. In any case, I tried updating both ( conda update conda; conda update ipython ),

Get virtualenv's bin folder path from script

跟風遠走 提交于 2019-11-30 07:56:53
I'm using virtualenvwrapper with a django project that has a management task that automatically writes some config files, so the user just has to ./manage.py generate_configuration > much_nice.conf And then move the file elsewhere. One of the generated config files is a task for supervisord that launches a celery worker. The problem I'm getting is that I don't know how to output the path of the celery executable that is within the bin folder of the virtualenv. Essentially, I'd like to have the output of the command which celery One option is using sys.executable , get the folder (which seems

virtualenv relocatable — does it really work [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-11-30 07:25:33
问题 This question already has answers here : Renaming a virtualenv folder without breaking it (8 answers) Closed 3 years ago . I kept looking for answer but didn't find one. I have a virtual env dir, a project dir with a req.txt. When I run pip -r req.txt, it installs some apps from github (source) and some from pypi. The ones from pypi are fine after relocatable call on the virtual evn, however the links in the site-packages for the apps that it installed from github still point to the old

mkvirtualenv: command not found

二次信任 提交于 2019-11-30 04:59:52
I'm new to Python virtual environments, so after reading this tutorial I tried to create my first environment using virtualenvwrapper . My python3 installation is at the bare bones now: $ pip3 list argparse (1.2.1) pip (1.5.6) setuptools (2.1) stevedore (0.15) virtualenv (1.11.6) virtualenv-clone (0.2.5) virtualenvwrapper (4.3.1) As suggested by the tutorial, I added the following lines to my .bashrc file: export WORKON_HOME=$HOME/.virtualenvs source /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper_lazy.sh which results in the following message when I open a new Terminal

Modifying a virtualenv so that packages installed in global site-packages are available [duplicate]

狂风中的少年 提交于 2019-11-30 03:29:09
Possible Duplicate: Revert the `--no-site-packages` option with virtualenv I've created a virtual environment using the virtualenvwrapper documentation as follows: $ pip install virtualenvwrapper $ export WORKON_HOME=~/Envs $ mkdir -p $WORKON_HOME $ source /usr/local/bin/virtualenvwrapper.sh $ mkvirtualenv env1 It works fine for the most part, but I've run into a few Django issues that require me to install some global packages outside of my virtual environment. Once I've installed these packages, how to I update my virtual environment to pull in these new packages? Or do I need to recreate