【发布时间】:2010-09-23 19:20:28
【问题描述】:
我正在尝试使用 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 可能存在错误,但我找不到任何确切的细节。
欢迎提出任何建议。
非常感谢,
阿尔。
【问题讨论】:
-
Python 安装在哪里?什么是 Python 路径? sys.path 当前设置为什么?
-
嗨,现在我将它放在本地目录中。 PYTHONPATH 未设置,sys.path 为:/usr/local/lib/python25.zip', '~/src/Python-2.5.2/Lib', '~/src/Python-2.5.2/Lib/ plat-sunos5', '~/src/Python-2.5.2/Lib/lib-tk', '~/src/Python-2.5.2/Modules', '~/src/Python-2.5.2/build/ lib.solaris-2.8-sun4u-2.5
-
我在最后一条评论中稍微缩短了路径以适应。
-
@AlMcLean 你能告诉我你是如何在 solaris 8 上编译 python-2.5 的吗?我正在尝试编译它两天。
标签: python gcc build-process solaris environment-variables