Problem with virtualenv in Mac OS X

前端 未结 14 2101
情歌与酒
情歌与酒 2020-12-23 16:29

I\'ve installed virtualenv via pip and get this error after creating a new environment:

selenium:~ auser$ virtualenv new  
New pyt         


        
14条回答
  •  臣服心动
    2020-12-23 17:22

    Like @RyanWilcox mentioned, you might be inadvertently pointing virtualenv to the wrong Python installation. Virtualenv comes with a -p flag to let you specify which interpreter to use.

    In my case,

    virtualenv test_env
    

    threw the same error as yours, while

    virtualenv -p python test_env
    

    worked perfectly.

    If you call virtualenv -h, the documentation for the -p flag will tell you which python it thinks it should be using; if it looks wonky, try passing -p python. For reference, I'm on virtualenv 1.11.6.

提交回复
热议问题