我使用python -m venv virtual
创建了一个虚拟python环境,然后尝试使用virtual\Scripts\pip install flask
安装flask。
但是后来我得到了这个错误:
virtual\Scripts\pip : The module 'virtual' could not be loaded. For more information, run 'Import-Module virtual'.
At line:1 char:1
+ virtual\Scripts\pip install flask
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (virtual\Scripts\pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoLoadModule
当我尝试Import-Module virtual
时,我得到了:
Import-Module : The specified module 'virtual' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module virtual
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (virtual:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
我该怎么办?
答案 0 :(得分:0)
我刚刚更改了虚拟环境的路径,并且效果很好