python - 如何在 Solaris 上安装 64 位 Python?

标签 python solaris

我正在尝试在 Solaris 上安装 Python 2.6通过在 Solaris 机器上构建源代码。我以这种方式安装了一个,它似乎是 32 位的。为此,我下载了一些 Linux 或 Unix 源码压缩包。一切正常,但我需要 64 位 Python。

我查看了 Python 下载站点,没有针对 64 位 Python 的单独安装。 这让我觉得在运行配置和/或安装命令时必须有一些选项来安装 Python。我尝试阅读安装的 README.txt 但找不到任何信息。我对在类似“Unix”的系统上安装非常陌生。

如何在 Solaris 上安装 64 位 Python?

最佳答案

我强烈建议您看看是否可以使用 32 位版本的 Python。如果您不熟悉在 Solaris 上编译东西,这将为您省去许多麻烦。但是,这是可能的,而且我确实有一个 64 位版本的 Python。我正在使用 cc: Sun C 5.8 2005/10/13 进行编译。此外,我已经编译了 64 位版本的 readline 和 ncurses。

我的配置行是这样的:

../Python-2.6.1/configure CCSHARED="-KPIC" LDSHARED="cc -xarch=generic64 -G -KPIC" LDFLAGS="-xarch=generic64 -L/opt/tools/lib -R/opt/tools/lib -L/opt/tools/ssl/lib -ltermcap -lz -R $ORIGIN/../lib" CC="cc" CPP="cc -xarch=generic64 -E -I/opt/tools/include -I/opt/tools/include/ncurses -I/opt/tools/include/readline" BASECFLAGS="-xarch=generic64 -I/opt/tools/include -I/opt/tools/include/ncurses" OPT="-xO5" CFLAGS="-xarch=generic64 -I/opt/tools/include -I/opt/tools/include/ncurses -I/opt/tools/include/readline" CXX="CC -xarch=generic64 -I/opt/tools/include -I/opt/tools/include/ncurses"  --prefix=/opt/tools/python-2.6.1 --enable-64-bit --without-gcc --disable-ipv6 --with-ssl=openssl --with-ncurses --with-readline

此外,我修改了 Modules/Setup.local 中的这两行以包含所需的位置:

readline readline.c -I/opt/tools/include/readline -L/opt/tools/lib -lreadline -ltermcap
_ssl _ssl.c -I/opt/tools/ssl/include -L/opt/tools/ssl/lib -lssl -lcrypto

现在,祈祷您不需要在某些 Sybase 绑定(bind)或某些其他 64 位库中进行编译。

关于python - 如何在 Solaris 上安装 64 位 Python?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1396678/

相关文章:

python - ndarray.tofile 的奇怪行为

python - 如何在 basemap 图形的标题下方添加间距?

python - 填充 Bokeh 中贝塞尔曲线之间的区域

linux - 用于查找文件系统使用情况的 Bash 脚本

compiler-errors - 在Solaris Sparc 11下强制使用Sun Studio在./configure中进行编译(而不是cc)

c - 在 Unix/Solaris 中验证用户名

python - python 中的最大迭代项和关键属性

c - 在 SO 上给出了这段代码,但是如何让它输出到 stdout 呢?

unix - 从附加到 ddd/dbx 的崩溃进程生成核心转储

python - 为正在运行的站点动态重新加载 URLConfs