我已经用macport安装了opencv和python绑定。我可以在用户的python中导入它,但不能用另一个导入。
iMac-di-Casa:~ giacomo$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv
>>> exit()
我尝试this answer,但我犯了两个错误:path
代替PATH
和sahre
代替share
。这是我在终端输入的内容:
iMac-di-Casa:~ giacomo$ export PATH=/opt/local/bin:/opt/local/sbin:$path
iMac-di-Casa:~ giacomo$ export PATH=/opt/local/bin:/opt/local/sbin:$PATH
iMac-di-Casa:~ giacomo$ export MANPATH=/opt/local/sahre/man:$MANPATH
iMac-di-Casa:~ giacomo$ export MANPATH=/opt/local/share/man:$MANPATH
现在没有任何作用:
iMac-di-Casa:~ giacomo$ python
-bash: python: command not found
我该如何修复我的错误?非常感谢。