Virtualenv: Virtualenv activation error

Created on 26 Jan 2016  ·  11Comments  ·  Source: pypa/virtualenv

I installed with python3 and when I tried activating it,

Missing end to balance this if statement
env/bin/activate (line 78): if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
                               ^
from sourcing file env/bin/activate
    called on standard input

source: Error while reading file 'env/bin/activate'

Please advise..

Most helpful comment

Have you tried activating using the fish script instead?

source py3env/bin/activate.fish

All 11 comments

What shell are you using? Could you paste the entire contents of the activate that you tried to run?

I'm using fish. Here's a screenshot :

screen shot 2016-01-26 at 11 47 08 am

Have you tried activating using the fish script instead?

source py3env/bin/activate.fish

As a follow up, what documentation did you read prior to using virtualenv? I'm wondering if there are any pertinent places that could address that different shell users might need to run a different shell script.

Thanks @Ivoz I followed this one

Thanks, I made a note to help.

Oops @Ivoz I thought I'll add it to the doc file myself and created this PR

Shall I close it?

Yes, thanks for the thought.

How does shell matter in this case?

Which shell you are executing an activate script with (using the source command, typically), determines what syntax that activate script needs to be written in.

Which shell you are executing an activate script with (using the source command, typically), determines what syntax that activate script needs to be written in.

thank you a lot for solving my problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

earthgecko picture earthgecko  ·  4Comments

neildhar picture neildhar  ·  4Comments

jwarren116 picture jwarren116  ·  5Comments

oconnor663 picture oconnor663  ·  3Comments

zbuc picture zbuc  ·  5Comments