Skip to content

Can't setup virtualenv #3

Open
Open

Description

@arigoldx

I was following along with TwilioQuest and thought I'd use it as an opportunity to expand my repertoire with Python.

Trick is, I don't have the command virtualenv and while I followed the link to https://docs.python.org/3/library/venv.html it didn't tell me how to get virtualenv -- in fact the text "virtualenv" doesn't exist at that link.

Maybe the Running the application section needs updating?

Activity

  1. arigoldx commented on Aug 15, 2019

    @arigoldx
    Author

    After clicking around a bit I found https://virtualenv.pypa.io/en/latest/installation/ which lead me to pip install virtualenv (non-sudo, as per the link).

    That said, virtualenv -p python3 env source env/bin/activate didn't work:

    ~/src/starter-python [master] $ virtualenv -p python3 env source env/bin/activate
    Running virtualenv with interpreter /usr/local/bin/python3
    Already using interpreter /usr/local/opt/python/bin/python3.6
    There must be only one argument: DEST_DIR (you gave env source env/bin/activate)
    

    I simply cd'ed into the directory I'd just cloned.

  2. arigoldx commented on Aug 15, 2019

    @arigoldx
    Author

    Ah I think I got it.

    After reading deeper into the linked python docs for virtual environments, I think I was successful with a python3 -m venv env followed by a source env/bin/activate.

    I'm gonna go with it and see what happens :)

  3. Sailandsee commented on Jun 9, 2020

    @Sailandsee

    I couldn't work it out, then I watched this video, which is awesome https://www.youtube.com/watch?v=APOPm01BVrk

  4. taffy-nay commented on Aug 10, 2020

    @taffy-nay

    I'm not sure if my issue is related at all, but when I try to activate the virtualenv I get

    virtualenv: error: unrecognized arguments: source env/bin/activate

    I'm not really sure what this is meant to mean.

  5. domincl commented on Dec 9, 2020

    @domincl

    @taffy-nay virtualenv and source are two different commands. You should not get the error message unrecognized arguments: source env/bin/activate if you issue them on two lines like this.

        virtualenv -p python3 env
        source env/bin/activate
    

    I have submitted PR #9 to fix README.md

  6. darrendbutler commented on Dec 10, 2020

    @darrendbutler

    I believe for windows, the command to activate your virtual environment is:
    enviornmentName\Scripts\activate

    The windows command isn't mentioned in the readMe. I ran this command on powershell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions