首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows 10 PowerShell中激活虚拟环境时出错

在Windows 10 PowerShell中激活虚拟环境时出错
EN

Stack Overflow用户
提问于 2020-08-14 13:10:52
回答 1查看 135关注 0票数 0

在Windows10 PowerShell中激活虚拟环境时,遇到了一个错误:

代码语言:javascript
复制
PS C:\Users\sunil\Desktop\my_projects> .\venv\Scripts\activate.ps1
.\venv\Scripts\activate.ps1 : The term '.\venv\Scripts\activate.ps1' 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.

即使用这种方式:

代码语言:javascript
复制
PS C:\Users\sunil\Desktop\my_projects\venv> .\Scripts\activate
Program 'activate' failed to run: No application is associated with the
specified file for this operationAt line:1 char:1
    + .\Scripts\activate
    + ~~~~~~~~~~~~~~~~~~.
EN

回答 1

Stack Overflow用户

发布于 2022-11-30 12:37:53

如果是Windows,请转到Path= "venv\Scripts“

"venv“是你虚拟环境的名字。然后执行以下命令:

set-Executionpolicy -Executionpolicy重签名的-Scope CurrentUser

现在键入activate (可选:按选项卡)并按返回

IT将被激活!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63413451

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档