如何在同一个 Windows XP 机器上同时运行 python 2.6 和 3.0? [英] how to run both python 2.6 and 3.0 on the same windows XP box?

查看:28
本文介绍了如何在同一个 Windows XP 机器上同时运行 python 2.6 和 3.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

人们使用什么样的设置在同一台 Windows 机器上同时运行 python 2.6 和 python 3.0?

What kind of setup do people use to run both python 2.6 and python 3.0 on the same windows machine?

推荐答案

Virtualenv 是Unix 和 Mac 平台上的首选解决方案.

Virtualenv is the solution of choice on Unix and Mac platforms.

virtualenv 是一个创建工具隔离的 Python 环境.

virtualenv is a tool to create isolated Python environments.

正在解决的基本问题是依赖项和版本之一,以及间接权限.想象你有一个需要版本的应用程序1 LibFoo,但另一个应用程序需要版本 2. 你如何使用这两个应用程序?如果你将所有东西安装到/usr/lib/python2.4/site-packages(或无论您的平台标准如何位置是),很容易在一个你无意中的情况升级不应升级的应用程序升级.

The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.4/site-packages (or whatever your platform's standard location is), it's easy to end up in a situation where you unintentionally upgrade an application that shouldn't be upgraded.

或者更一般地说,如果你想怎么办安装应用程序并离开它是?如果应用程序有效,任何更改其库或这些库的版本可能会损坏应用程序.

Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.

另外,如果你不能安装怎么办打包成全局站点包目录?例如,在共享主持人.

Also, what if you can't install packages into the global site-packages directory? For instance, on a shared host.

我没有尝试过这个,但是与在 Windows 中使用相关的文档的存在让我认为它现在可以在 Windows 上运行.

I have not tried this, but the presence of documentation relating to use in Windows makes me think that it now works on Windows.

这篇关于如何在同一个 Windows XP 机器上同时运行 python 2.6 和 3.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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