如何在 Solaris 上安装 64 位 Python?

发布于 2024-08-04 09:21:20 字数 400 浏览 5 评论 0原文

我正在尝试通过在 Solaris 计算机上构建源代码来在 Solaris 上安装 Python 2.6。我用这个方法安装了一个,看起来是32位的。为此,我下载了一些 Linux 或 Unix 源代码 tar 包。一切正常,但我需要 64 位 Python。

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

如何在 Solaris 上安装 64 位 Python?

I am trying to install Python 2.6 on Solaris by building the source on Solaris machine. I installed one this way and it appears that it is 32-bit. I downloaded some source tar ball as Linux or Unix for this purpose. Everything works well but I need 64-bit Python.

I looked up the Python download site and there is no separate installation for a 64-bit Python.
That makes me think that there must be some option while running configure and/or install commands to install Python. I tried reading README.txt of the installation but could not find any info. I am very new to installations on "Unix" like systems.

How can I install 64-bit Python on Solaris?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鸠书 2024-08-11 09:21:20

我强烈建议您看看是否可以使用 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 绑定或其他一些 64 位库中进行编译。

I would strongly suggest seeing if you can get away with the 32 bit version of Python. If your new to compiling stuff on Solaris, this will save you many headaches. However, it is possible, and I do have a working 64 bit version of Python. I'm using cc: Sun C 5.8 2005/10/13 to compile. Additionally, I've already compiled 64-bit version of readline and ncurses.

My configure line looks like this:

../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

Additionally, I modified these two lines in Modules/Setup.local to include the required locations:

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

Now, just pray you don't need to compile in some Sybase bindings or some other 64-bit libraries.

玉环 2024-08-11 09:21:20

目前,Solaris 64 位支持不是最理想的,这是一个已确认的错误,但该错误报告似乎包含一些内容您可能想要使用的标志。另请参阅此邮件列表帖子

It's currently an acknowledged bug that Solaris 64-bit support is suboptimal, but that bug report looks to contain some flags that you might want to use. See also this mailing list posting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文