在ubuntu-lucid中使用virtualenv安装python2.7

时间:2021-10-22 00:51:36

I have python2.6 on ubuntu lucid.I have installed virtualenv 1.8.2 for python2.6 .There is the virtualenv-1.8.2-py2.6.egg in /usr/local/lib/python2.6/dist-packages folder.

我在ubuntu lucid上有python2.6。我为python2.6安装了virtualenv 1.8.2。/usr/local/lib/python2.6/dist-packages中有virtualenv-1.8.2-py2.6.egg夹。

I want to install python2.7 using virtualenv so I can test some of my code.How do I go about this?I tried

我想使用virtualenv安装python2.7所以我可以测试我的一些代码。我怎么去做这个?我试过了

virtualenv venv27 --distribute --no-site-packages --python=python2.7

which gave an error like

这给出了一个错误

The executable python2.7 (from --python=python2.7) does not exist

Please tell me how to go about this? Do I have to upgrade my O.S ?

请告诉我怎么去?我必须升级我的O.S吗?

1 个解决方案

#1


0  

virtualenv does not download or install Python (different from Ruby's rvm).

virtualenv不下载或安装Python(与Ruby的rvm不同)。

When you specify what python you want virtualenv to be based on (--python=PYTHON_BIN), that executable must exist. virtualenv uses that python installation to create its symlinks, shebangs, and everything.

当你指定你希望virtualenv基于什么python(--python = PYTHON_BIN)时,该可执行文件必须存在。 virtualenv使用这个python安装来创建它的符号链接,shebangs和所有东西。

As @Blender and @Dikei told you, you must have Python 2.7 before you create your virtualenv.

正如@Blender和@Dikei告诉你的那样,在创建virtualenv之前必须使用Python 2.7。

#1


0  

virtualenv does not download or install Python (different from Ruby's rvm).

virtualenv不下载或安装Python(与Ruby的rvm不同)。

When you specify what python you want virtualenv to be based on (--python=PYTHON_BIN), that executable must exist. virtualenv uses that python installation to create its symlinks, shebangs, and everything.

当你指定你希望virtualenv基于什么python(--python = PYTHON_BIN)时,该可执行文件必须存在。 virtualenv使用这个python安装来创建它的符号链接,shebangs和所有东西。

As @Blender and @Dikei told you, you must have Python 2.7 before you create your virtualenv.

正如@Blender和@Dikei告诉你的那样,在创建virtualenv之前必须使用Python 2.7。