Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't setup virtualenv #3

Open
arigoldx opened this issue Aug 15, 2019 · 6 comments
Open

Can't setup virtualenv #3

arigoldx opened this issue Aug 15, 2019 · 6 comments

Comments

@arigoldx
Copy link

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?

@arigoldx
Copy link
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.

@arigoldx
Copy link
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 :)

@Sailandsee
Copy link

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

@taffy-nay
Copy link

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.

@domincl
Copy link

domincl commented Dec 9, 2020

@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

@darrendbutler
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants