为Python2.7安装virtualenv [英] Installing virtualenv for Python2.7

查看:191
本文介绍了为Python2.7安装virtualenv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我并排安装了python 2.7和3.3(C:\Python27和C:\Python33)。我现在正在尝试安装virtualenv。



Python2.7是我的默认解释器。每当我打开命令提示符并键入 python时,它都会为我显示 Python 2.7.10(默认值,2015年5月23日,09:40:32)[win32上的MSC v.1500 32位(英特尔)]。但是当我触发 pip install virtualenv时,它是在python3.3文件夹中安装virtualenv。



我很惊讶我的活动解释器是python2.7,但是virtualenv安装以某种方式进入了python3.3文件夹,而不是预期的python2.7文件夹。谁能解释这个异常并建议我如何在python 2.7中安装virtualenv吗?设置为 python 使用python2.7环境变量,并为此使用python3.3 pip 的路径,您可以根据需要使用它们,或者调整它们或使用完整路径。


I have installation of python 2.7 and 3.3 side by side (C:\Python27 and C:\Python33). I am now trying to install virtualenv.

Python2.7 is my default interpreter. 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. But when I am firing "pip install virtualenv", it is installing virtualenv inside python3.3 folder.

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. Can anyone please explain this anomaly and suggest me how to install virtualenv inside python 2.7 ?

解决方案

I'd imagine your environment variables are set up to use the python2.7 environment variable for python and the path to the python3.3 pip for that, you either need to adjust those or use the full paths when using the tool as you require.

这篇关于为Python2.7安装virtualenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆