complete beginner here. Trying to build a flask web app. Using Windows 8.
Having some problems activating my python virtualenv in Cygwin. I have been using git shell up till now with no problems.
I copied my folder ("app") into my cygwin home directory and it is set up like so:
app - templates
- flask - env - scripts - python
$ source flask/env/scripts/activate
$ which python
You should not move the virtualenv. The
activate script inside the virtualenv uses absolute paths internally. If you move the directory, the paths will no longer work, and so
which python finds the first valid binary on
PATH, which is your global binary.
If you need to move the project to a different location, and the virtualenv together with it, then recreate the virtualenv, do not copy it.
The recommended practice is to have a
requirements.txt file, and install packages using
pip install -r requirements.txt.
That way, recreating a virtualenv is very easy: create an empty virtualenv, and run the
pip ... command. There should be nothing else inside the virtualenv that needs moving, only what
pip put there, or other python installer scripts, if you used any (and which you would need to re-run, in addition to