Python 2.5.2 and Solaris 8 (gcc 3.4.2) build issues

I'm trying to build python 2.5.2 on Solaris 8 using gcc 3.4.2. I can't see any immediate errors in the ./configure step but, once built and i enter the python shell doing an import time errors with :

Python 2.5.2 (r252:60911, Nov 21 2008, 18:45:42)
[GCC 3.4.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named time

What am i doing wrong? From what i can see with a cursory google is that there might be an error with libstdc++.so, but i can't find any hard details.

Any suggestions would be most welcome.

Many thanks,

Al.


Asked by: Rafael654 | Posted: 06-10-2021






Answer 1

The time module is not built by default in Python, if you build from a source distribution you need to explicitly enable all the modules you want to compile.

Open up Modules/Setup.dist in the python source tree and comment out the line which says:

#time timemodule.c

To enable the build of time module. Also remember that you need to recompile Python for this to take an effect.

Answered by: Vanessa524 | Posted: 07-11-2021



Similar questions

python - lxml build on Solaris 10

Please can you help and advise with a problem with python 2.6.6 and lxml Solaris 10 build? Installation instructions: www.sunfreeware.com/download.html direct link to the file: http://www.sunfreeware.com/ftp/pub/freeware/sparc/10/lxml-2.2.8-sol10-sparc-local.gz [rainier]/usr/apps...


python numpy on solaris, blas slow or not linked?

Matrix-Matrix multiplies are very slow on my Solaris install (running on a sparc server) compared to my OSX install (on a laptop!). The laptop runs 100 times faster (for matrix-matrix multiplies of 3000x3000 dense random matrices of doubles). It must be because the Solaris install is not using blas, but the numpy scripts are reporting that the libs are 'found'. $python3 -c "import numpy.distutils.s...


Python expand user doesn't work over su on Solaris and AIX

My script needs to execute as root, and for some tasks as someuser, I also need to get someuser $HOME path, and thats where comes the problem. For that job (find user home) I'm using os.path.expanduser. As mentioned the script needs to change his user with su and run the code to get user home: test_home.py


python - lxml build on Solaris 10

Please can you help and advise with a problem with python 2.6.6 and lxml Solaris 10 build? Installation instructions: www.sunfreeware.com/download.html direct link to the file: http://www.sunfreeware.com/ftp/pub/freeware/sparc/10/lxml-2.2.8-sol10-sparc-local.gz [rainier]/usr/apps...


python numpy on solaris, blas slow or not linked?

Matrix-Matrix multiplies are very slow on my Solaris install (running on a sparc server) compared to my OSX install (on a laptop!). The laptop runs 100 times faster (for matrix-matrix multiplies of 3000x3000 dense random matrices of doubles). It must be because the Solaris install is not using blas, but the numpy scripts are reporting that the libs are 'found'. $python3 -c "import numpy.distutils.s...


solaris - Running vi from Python script

I'm trying to open a file with vanilla vi (/usr/bin/vi on Solaris 10) from a Python (2.6.4) script, and nothing I do seems to be working. I want to have the script put some data in a temporary file, then open that file in vi for the user to edit. Ideally the script would block on the call to vi and continue executing when the user is finished, but I could settle for solutions transforming the script process into the vi p...


Python expand user doesn't work over su on Solaris and AIX

My script needs to execute as root, and for some tasks as someuser, I also need to get someuser $HOME path, and thats where comes the problem. For that job (find user home) I'm using os.path.expanduser. As mentioned the script needs to change his user with su and run the code to get user home: test_home.py






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



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



top