【发布时间】:2019-12-21 09:54:08
【问题描述】:
我想在 Windows 10 中为 python 3.7 创建一个 virtualenv
我正在尝试遵循python doc的指示
所以我首先输入了命令
PS T:\python -m venv c:\path\to\myenv
它确实在该路径中创建了目录和文件
然后根据文档,使用 PowerShell 我输入:
PS T:\path\to\myenv\Scripts\Activate.ps1
但我得到了以下信息:
The term
'T:\path\to\myenv\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.
At line:1 char:1
+ T:\path\to\myenv\Scripts\Activate.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (T:\path\to\myenv...ts\Activate.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我错过了什么
【问题讨论】:
-
你的 virtualenv 在 C 盘上 -
c:\path\to\myenv
标签: python python-3.x windows powershell python-venv