I cannot activate virtualenv on windows 10

▼魔方 西西 提交于 2021-01-29 18:48:39

问题


I am trying to activate virtualenv on windows 10x64 by using this command:

source \env\Scripts\activate.bat

but I get this error:

source : The term 'source' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that 
the path is correct and try again.
At line:1 char:1
+ source \env\Scripts\activate.bat
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (source:String) [], CommandNotFoundException  
    + FullyQualifiedErrorId : CommandNotFoundException

回答1:


Ok about that, source is a shell command that only used in Linux systems, but not for windows systems. In window you should run it as...(Let's assume directory is inside of C:)

C:\Users\env\Scripts\activate.bat


来源:https://stackoverflow.com/questions/59099720/i-cannot-activate-virtualenv-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!