Python 2.5.2 和 Solaris 8 (gcc 3.4.2) 构建问题
我正在尝试使用 gcc 3.4.2 在 Solaris 8 上构建 python 2.5.2。 我在 ./configure 步骤中看不到任何直接错误,但是一旦构建,我进入 python shell 执行导入时错误:
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
我做错了什么? 从我粗略的谷歌可以看到的是 libstdc++.so 可能有错误,但我找不到任何硬细节。
任何建议都将受到欢迎。
非常感谢,
阿尔。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,Python 中不会构建 time 模块,如果您从源代码发行版构建,则需要显式启用要编译的所有模块。
打开 python 源代码树中的 Modules/Setup.dist 并注释掉以下行:
启用时间模块的构建。 另请记住,您需要重新编译 Python 才能生效。
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:
To enable the build of time module. Also remember that you need to recompile Python for this to take an effect.