Python 2.5.2 and Solaris 8 (gcc 3.4.2) build issues

ⅰ亾dé卋堺 提交于 2019-12-12 15:16:26

问题


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.


回答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.



来源:https://stackoverflow.com/questions/314749/python-2-5-2-and-solaris-8-gcc-3-4-2-build-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!