简体   繁体   English

python venv“activate.bat vs activate.ps1 vs deactivate.bat”

[英]python venv "activate.bat vs activate.ps1 vs deactivate.bat"

I named my virtual environment .venv .我将我的虚拟环境命名为.venv I went into .venv/Scripts/ and there were activate.bat and Activate.ps1 .我进入.venv/Scripts/并且有activate.batActivate.ps1 My guess is that I need to run activate.bat or Activate.ps1 to access the virtual environment, but I don't know the difference between activate.bat and Activate.ps1 .我的猜测是我需要运行activate.batActivate.ps1来访问虚拟环境,但我不知道activate.batActivate.ps1之间的区别。

And I want more.我想要更多。 what is difference between activate.??? activate.??? and deactivate.bat ?deactivate.bat Also, why isn't deactivate.ps1 there?另外,为什么deactivate.ps1不在那里?

And I am using powershell.我正在使用 powershell。

Looking on the inte.net, it says to use activate.bat , but they seem to use cmd. I want powershell. inte.net 上说要使用activate.bat ,但他们似乎使用 cmd。我想要 powershell。

ps1 is for powershell and bat is for cmd. ps1用于 powershell, bat用于 cmd。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM