【发布时间】:2021-01-03 16:25:19
【问题描述】:
我先删除了 virtualenv,然后再次创建它。通过运行.\\Envs\automation_cookbook\Scripts\activate.bat,正如post 中提到的那样。但是提示根本没有改变。我怀疑我是否成功运行它。
PS C:\Users\yashi> rmvirtualenv automation_cookbook
Deleted C:\Users\yashi\Envs\automation_cookbook
PS C:\Users\yashi> mkvirtualenv automation_cookbook
created virtual environment CPython3.9.0.final.0-64 in 329ms
creator CPython3Windows(dest=C:\Users\yashi\Envs\automation_cookbook, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\yashi\AppData\Local\pypa\virtualenv)
added seed packages: pip==20.3.1, setuptools==51.0.0, wheel==0.36.1
activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
PS C:\Users\yashi> .\\Envs\automation_cookbook\Scripts\activate.bat
PS C:\Users\yashi>
PS C:\Users\yashi> lsvirtualenv
dir /b /ad "C:\Users\yashi\Envs"
==============================================================================
automation_cookbook
编辑:我正在通过 virtualenvwrappe 尝试它
【问题讨论】:
-
现在你可能已经明白了;但是对于那些看起来像我的人......你的提示是PowerShell,所以你需要激活
YourVenv\Scripts\activate.ps1而不是.bat
标签: python virtualenv virtualenvwrapper