Running virtualenv to set the ENV

Chris Angelico rosuav at gmail.com
Wed Apr 24 19:00:22 EDT 2019


On Thu, Apr 25, 2019 at 8:55 AM Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Wed, 24 Apr 2019 09:17:28 -0700 (PDT), Rich Shepard
> <rshepard at appl-ecosys.com> declaimed the following:
>
> >I've installed virtualenv in Slackware-14.2. Now I want to set up the ENV
> ><https://virtualenv.pypa.io/en/stable/userguide/> in an application's
> >development directory.
> >
>
>         That... sounds backwards...
>
>         So far as I understand it (I've only used a virtual when following a
> book for Flask) you create the virtual environment first, and then set up
> the application development INSIDE that environment.
>

Can be either way. What I do is "python3 -m venv env" in the app
directory, which creates a subdirectory called "env". (I also have
some bash integration that means that any time it sees a directory
called "env", it auto-activates that venv.) So the venv is inside the
app (and, of course, mentioned in .gitignore).

ChrisA



More information about the Python-list mailing list