我设法安装了 virtualenv,通过 pip install 安装了 django-1.4-alpha-1,并尝试用它的 manage.py runserver
尽管我通过激活(注意下面 cmd 屏幕中的前缀)将 virtualenv 切换到正确的环境(我成功安装了 django),manage.py runserver
仍然以某种方式从我的 stable 中获取数据而不是-virtualenv python 安装。
稳定的 python(错误的):D:\Python26\Scripts
右一个:E:\Prace\django-1.4-alpha-1\Scripts
我的 PATH 不包含任何 Python。
命令屏幕:
最佳答案
带有 .py 扩展名的文件链接到您的默认 Windows Python 安装。使用 virtualenv python 可执行文件的一种方法是输入 python manage.py <command>
相反。
另请参阅 a question I posted on this matter before 的已接受答案.
关于python - Windows virtualenv 不为 django 切换 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9066995/