How to install 64-bit Python on Solaris?

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?

Asked by: Maya624 | Posted: 06-12-2021

Answer 1

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.

Answered by: Marcus676 | Posted: 07-01-2022

Answer 2

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.

Answered by: Miranda463 | Posted: 07-01-2022

Similar questions

macos - python install on leopard

I'll admit I'm completely dumbed by python install. Can someone help me on how to install module I want to play with PyGame, PyOpenGL etc. So I install them, but I everytime I type "import pygame" error message shows up. here's my environment so far. In .bash_profile PATH=${PATH}:/System/Library/Frameworks/Python.framework/Versions/Current/bin Using easy_install PyO...

python - How can I install pyCurl?

I used libcurl with no problems and used pyCurl once in the past. Now i want to set it up on my machine and dev. However i have no idea how to do it. I rather not DL libcirl files and compile that along with pycurl, i want to know the simplest method. I have libcurl installed on my machine. I am on Windows. I tried DLing the sources and use pycurl setup script, but I had no luck.

python - where does django install in ubuntu

I am looking for the file for django. I tried whereis and find, but I get a lot of dirs.

python - Install mysqldb on snow leopard

I am trying to get started on working with Python on Django I am by profession a PHP developer and have been told to set up django and python on my current apache and mysql setup however I am having trouble getting the Mysqldb module for python to work, I must of followed about 6 different set of instructions, I am running snow leopard and have mysql installed natively it is not part of MAMP or similar. Please can some tel...

Install python 2.6 in CentOS

I have a shell that runs CentOS. For a project I'm doing, I need python 2.5+, but centOS is pretty dependent on 2.4. From what I've read, a number of things will break if you upgrade to 2.5. I want to install 2.5 separately from 2.4, but I'm not sure how to do it. So far I've downloaded the source tarball, untarred it, and did a ./configure --prefix=/opt which is where I want it to end ...

macos - Install PyObjC on Python 2.6 on OS X 10.5?

OS X 10.5.8 came with Python 2.5, and had PyObjC already installed. I installed Python 2.6 from the site, and PyObjC isn't there. I can't find a download to install PyObjC on my Python 2.6 install. Is checking out the PyObjC trunk and trying to build it my only choice? Will that work "out of the box"?

python - How to install numpy and scipy on Windows XP

python - How do I install SciPy on 64 bit Windows?

How do I install SciPy on my system? For the NumPy part (that SciPy depends on) there is actually an installer for 64 bit Windows: (is direct download URL, 2310144 bytes). Running the SciPy superpack installer results in this message in a dialog box:...

What should I install in order to be able to use GTK in Python on Ubuntu?

In my source code I have: import gtk But when I run the script with python3 command I get the following error. What package should I install to get it working? Edit: my bad. here is the error: ImportError: No module named gtk Edit2: Thanks for the answer, But I'm still getting an error message. Take a look at the following...

python - How to install pycairo on osx?

I am trying to install the pycairo (Python bindings for the cairo graphics library) under OSX. I started with easy_install pycairo and got: Requested 'cairo >= 1.8.8' but version of cairo is 1.0.4 error: Setup script exited with Error: cairo...

Still can't find your answer? Check out these communities...

PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python