【问题标题】:How to install omniORB for python3?如何为 python3 安装omniORB?
【发布时间】:2018-05-23 06:28:41
【问题描述】:

我可以通过执行配置脚本让omniORB在python2.7中运行。

ubuntu@ubuntu:/usr/local/bin$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ubuntu@ubuntu:/usr/local/bin$ python2
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import omniORB
>>> 

但是,正在运行

../configure PYTHON=/usr/bin/python3

没有为 python3 做到这一点:

ubuntu@ubuntu:/usr/local/bin$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import omniORB
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'omniORB'
>>> 

当不带任何选项运行../configure 时,脚本输出:

...
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
...

运行../configure PYTHON=/usr/bin/python3时,脚本输出:

...
checking for python version... 3.5
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.5/site-packages
...

我正在使用 ubuntu 16.04 和最新的 omniorb 4.2.2。

【问题讨论】:

  • 之后你只跑了configure,而不是makemake install
  • 当然。在这两种情况下,我都跑了makemake install

标签: python-3.x omniorb


【解决方案1】:

我也遇到了同样的问题(我使用的是 ubuntu 18.04 和 omniORB 4.2.3)。

在我的例子中,omniORBpy 安装在 /usr/local/lib/python3.6/site-packages 中,但该目录不在 python 的 sys.path 中。

您应该检查 sys.path 以及omniORBpy 的安装位置。

【讨论】:

    猜你喜欢
    • 2012-09-11
    • 2012-03-31
    • 1970-01-01
    • 2018-10-12
    • 1970-01-01
    • 2016-09-08
    • 2019-11-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多