简体   繁体   English

为Python2.7安装virtualenv

[英]Installing virtualenv for Python2.7

I have installation of python 2.7 and 3.3 side by side (C:\\Python27 and C:\\Python33). 我并排安装了python 2.7和3.3(C:\\ Python27和C:\\ Python33)。 I am now trying to install virtualenv. 我现在正在尝试安装virtualenv。

Python2.7 is my default interpreter. Python2.7是我的默认解释器。 Whenever I open a command prompt and type 'python' it brings up "Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32" for me. 每当我打开命令提示符并键入“ python”时,它都会为我显示“ Python 2.7.10(默认值,2015年5月23日,09:40:32)[win32上的MSC v.1500 32位(英特尔)]”。 But when I am firing "pip install virtualenv", it is installing virtualenv inside python3.3 folder. 但是当我触发“ pip install virtualenv”时,它是在python3.3文件夹中安装virtualenv。

I am quite surprised that my active interpreter is python2.7, but virtualenv installation is somehow getting inside python3.3 folder instead of expected python2.7 folder. 我的活动解释器是python2.7,这让我感到非常惊讶,但是virtualenv的安装却以某种方式进入了python3.3文件夹,而不是预期的python2.7文件夹。 Can anyone please explain this anomaly and suggest me how to install virtualenv inside python 2.7 ? 谁能解释这个异常并建议我如何在python 2.7中安装virtualenv?

我想您的环境变量设置为将python2.7环境变量用于python以及python3.3 pip的路径,您需要调整它们或在使用该工具时根据需要使用完整路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM