导入 cymunk 的问题
Problems importing cymunk
我下载了 cymunk 以在 kivent_cymunk 上使用它,当我尝试导入它时出现以下错误:
>>> import cymunk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/cymunk/__init__.py", line 1, in <module>
from .cymunk import *
File "/usr/local/lib/python2.7/dist-packages/cymunk/cymunk/__init__.py", line 1, in <module>
from .cymunk import *
ImportError: No module named cymunk
所以python在我的main.py中找到了cymunk,但是在cymunk中没有找到cymunk。init()。
我正在 ubuntu 14.04 上工作,我这样安装了 cymunk:
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py build
running build
running build_py
running build_ext
skipping 'cymunk/cymunk.c' Cython extension (up-to-date)
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py check
running check
warning: check: missing required meta-data: version, url
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py install
running install
running build
running build_py
running build_ext
skipping 'cymunk/cymunk.c' Cython extension (up-to-date)
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/cymunk-0.0.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/cymunk-0.0.0.egg-info
您可能已经意识到缺少所需的肉类数据。
我不知道那是什么,也不知道这是否是我的问题。
我做错了什么?我该怎么做才能让 cymunk 工作?
感谢您的帮助,谢谢!!
根据您的构建输出,您错误地将 "cymunk" 源提取到 /usr/local/lib/python2.7/dist-packages/cymunk 中。
您不应将源解压缩到 /usr/local/lib/python2.7/dist-packages/...,在这种情况下,源目录 "name" 与随站点安装的库名称冲突-包。
修复:
rm -rf /usr/local/lib/python2.7/dist-packages/cymunk
extract and rebuild from your home dir
我下载了 cymunk 以在 kivent_cymunk 上使用它,当我尝试导入它时出现以下错误:
>>> import cymunk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/cymunk/__init__.py", line 1, in <module>
from .cymunk import *
File "/usr/local/lib/python2.7/dist-packages/cymunk/cymunk/__init__.py", line 1, in <module>
from .cymunk import *
ImportError: No module named cymunk
所以python在我的main.py中找到了cymunk,但是在cymunk中没有找到cymunk。init()。
我正在 ubuntu 14.04 上工作,我这样安装了 cymunk:
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py build
running build
running build_py
running build_ext
skipping 'cymunk/cymunk.c' Cython extension (up-to-date)
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py check
running check
warning: check: missing required meta-data: version, url
daniel@daniel-K54C:/usr/local/lib/python2.7/dist-packages/cymunk$ sudo python setup.py install
running install
running build
running build_py
running build_ext
skipping 'cymunk/cymunk.c' Cython extension (up-to-date)
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/cymunk-0.0.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/cymunk-0.0.0.egg-info
您可能已经意识到缺少所需的肉类数据。 我不知道那是什么,也不知道这是否是我的问题。
我做错了什么?我该怎么做才能让 cymunk 工作? 感谢您的帮助,谢谢!!
根据您的构建输出,您错误地将 "cymunk" 源提取到 /usr/local/lib/python2.7/dist-packages/cymunk 中。
您不应将源解压缩到 /usr/local/lib/python2.7/dist-packages/...,在这种情况下,源目录 "name" 与随站点安装的库名称冲突-包。
修复:
rm -rf /usr/local/lib/python2.7/dist-packages/cymunk
extract and rebuild from your home dir