无法在 Windows 上打开 virtualenv [英] Cannot open virtualenv on WIndows
问题描述
我正在尝试在 Windows 7 上创建一个虚拟环境 - 我在站点包中有 Python27
、virtualenv
,路径设置为 site=packages
和脚本,但无法打开 virtualenv.
I am trying to create a virtual env on windows 7 - I have Python27
, virtualenv
in site-packages, Path set to site=packages
and scripts, but am unable to open virtualenv.
C:\>python virtualenv flask
python: can't open file 'virtualenv': [Errno 2] No such file or directory
推荐答案
使用此命令,您将尝试运行 C:\
文件夹中的文件 virtualenv
.这不是你想要的.
With this command you are trying to run file virtualenv
in folder C:\
. It's not what you want.
我不知道您是如何将 virtualenv
安装到您的 Windows 框中,但安装脚本应该将 virtualenv.exe
放在 C:/path/中to/python/Scripts
(C:/Python27/Scripts/virtualenv.exe
在我的机器上).
I don't know how you've installed virtualenv
into your Windows box but installation script should have placed virtualenv.exe
in C:/path/to/python/Scripts
(C:/Python27/Scripts/virtualenv.exe
on my machine).
所以你只需要
C:\>C:/path/to/python/Scripts/virtualenv.exe flask
PS:将 C:/path/to/python/Scripts
放在 PATH
这篇关于无法在 Windows 上打开 virtualenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!