我可以在OS X上安装一个32位安装的Python 2.7.1 64bit吗? [英] Can I install Python 2.7.1 64bit along side of an exsiting 32bit install on OS X?

查看:217
本文介绍了我可以在OS X上安装一个32位安装的Python 2.7.1 64bit吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简短说明

是否可以从 python.org 在Python 2.7.1 32位的现有安装(python.org)之上?

Short Description
Is it possible to install Python 2.7.1 64/32bit from python.org on top of an existing install (from python.org) of Python 2.7.1 32bit?

背景

我为wxPython(2.8)的支持安装了32位版本,直到现在给我的是零问题。有几个模块,我现在很难安装(psycopg2和mysql-python)。自制软件中的警告信息不断提醒我,在路径上没有一个64位版本的Python。这些警告只会添加到我希望使用64位版本的列表中。

Background
I installed the 32bit version for wxPython(2.8) support which until now has given me zero issues. There are a few modules that I am now having difficultly installing (psycopg2 and mysql-python). The warning messages in homebrew constantly warn me about not having a 64bit version of Python on the path. These warnings only add to my list of wanting to use a 64 bit version.

当我选择32位安装时,特定项目的GUI是主要的焦点。现在,GUI已经非常简单,数据库后端支持(使用Django)更为重要。这就是说,使用开发版本的wxPython 2.9(支持OS X和64位2.7)已经可以接受。

At the time I selected the 32bit install, the GUI for a particular project was the main focus. Now the GUI has been come very simple and the database back-end support (using Django) is much more important. This being said, using the development version of wxPython 2.9 (which supports OS X and 64bit 2.7) has become acceptable.

对于非mac用户,为了解释为什么我必须使用32位版本,请参阅这个在wxpython项目中使用virtualenv的简要指南

For the non-mac users, to help explain why I had to use the 32bit version please see this Brief guide to using virtualenv in a wxpython project

系统信息

开发系统

操作系统: / em> Mac OS X Snow Leopard(10.6.7)

Python: 2.7.1 with virutalenv / virutalenv-wrapper

项目依赖关系:

请注意,如果我可以获得postgresql来安装homebrew,那么MySQL可能是PostgresSQL的psycopg2

System Information
Development System
OS: Mac OS X Snow Leopard (10.6.7)
Python: 2.7.1 with virutalenv / virutalenv-wrapper
Project Dependencies:
Note that MySQL could be PostgresSQL's psycopg2 if I can get the postgresql to install with homebrew


Django == 1.2.5

MySQL-python == 1.2.3

PIL == 1.1.7

PyVISA == 1.3

pyserial == 2.5

virtualenv == 1.5.1

virtualenvwrapper == 2.6.3

wsgiref == 0.1.2

wxPython == 2.8.11.0

wxPython-common == 2.8.11.0

Django==1.2.5
MySQL-python==1.2.3
PIL==1.1.7
PyVISA==1.3
pyserial==2.5
virtualenv==1.5.1
virtualenvwrapper==2.6.3
wsgiref==0.1.2
wxPython==2.8.11.0
wxPython-common==2.8.11.0

部署系统

Windows XP / Windows 7

Python:希望没有(使用py2exe或类似工具的目标)

Deployment System
OS: Windows XP / Windows 7
Python: Hopefully none (goal to use py2exe, or similar tool)

当前想法

我担心我的目标无法根据文件路径单独完成。在Windows 7中,标识符(x86)被放置在显示它是32位程序的路径中,但是在OS X上,32位或64/32位安装的路径将相同(/Library/Frameworks/Python.framework/Versions/ 2.7 /)。

Current Thoughts
I fear that my goal cannot be accomplished based on the file paths alone. In Windows 7 the identifier (x86) is placed in the path showing that it is a 32bit program, but on OS X the path would be the same for 32bit or 64/32bit installs (/Library/Frameworks/Python.framework/Versions/2.7/).

任何想法或意见都将有所帮助!

Any thoughts or comments would be helpful!

更新5-18-2011:8:40 AM

我已经确认使用预编译.dmg)框架构建,安装64位版本 将32位安装程序放弃。这对我的虚拟环境产生了负面影响,因为我在环境中安装的所有东西都是基于32位安装,几乎每个模块都会抛出一些错误。

Update 5-18-2011: 8:40 AM
I have confirmed that using the pre-compiled (.dmg) framework builds, installing the a 64 bit version does blow away the 32 bit install. This did negatively effect my virtual environments in that all of the things I have installed in the environments was based on the 32 bit install nearly every module threw an error of some sort.

我仍然没有在同一台机器上安装32位和64位,但是查看 homebrew 具有更多的细节,看起来这个可能是可能的。诀窍将是为每个python构建(从源)定义自己的公式,并将安装目录重命名为Python27_32和Python27_64。我会继续探索这个前线,因为我有时间。

I still have not achieved installing 32 bit and 64 bit on the same machine, however looking into homebrew with greater detail does look this could be possible. The trick would be to define your own formulas for each of the python builds (from source) and rename the install directory to something like 'Python27_32' and 'Python27_64'. I'll keep exploring this front as I have time.

编辑7-12-2011:10:51 AM CST

有没有人能够控制如何自制编译选项?具体如何选择使用64位编译器或32位编译器?如果没有提出任何问题,我会创建一个新的SO问题。

EDIT 7-12-2011: 10:51 AM CST
Has anyone out there been able control how homebrew compile options? Specifically how to select to use a 64bit compiler or a 32 bit compiler? I will create a new SO question if this doesn't bring anything up.

推荐答案

查看 http ://www.macports.org/ 其中提供了各种不同口味的linux / unix工具的端口,这些工具不会出现在默认的MacInstallation中,并且与其他方式重复。它在/ opt / local中安装任何东西,而不是踩在已安装的基础上。通过对PATH和LD_LIBRARY_PATH的一些操作,这可能会为您提供所需的选项。

Check out http://www.macports.org/ Which provides ports of various flavors of linux/unix tools that don't appear in the default MacInstallation and duplicates those that it needs otherwise. It installs everthing in /opt/local instead of stepping on the installed base. With some manipulation of PATH and LD_LIBRARY_PATH this might give you the options you need.

这篇关于我可以在OS X上安装一个32位安装的Python 2.7.1 64bit吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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