pymunk 验证测试在全新安装后失败
pymunk verification test failing after fresh installation
我尝试安装 pymunk
,但安装验证测试 (python -m pymunk.tests test
) 失败:
>python -m pymunk.tests test
Traceback (most recent call last):
File "C:\Users\ayrto\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\ayrto\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\ayrto\pymunk.py", line 4, in <module>
space = pymunk.Space() # Create a Space which contain the simulation
AttributeError: partially initialized module 'pymunk' has no attribute 'Space' (most likely due to a circular import)
我是 运行 Python Win 10 中的 3.8.3。
pymunk 版本:
pip install pymunk
Requirement already satisfied: pymunk in c:\users\appdata\local\programs\python\python38\lib\site-packages (5.6.0)
Requirement already satisfied: cffi!=1.13.1 in c:\users\appdata\local\programs\python\python38\lib\site-packages (from pymunk) (1.14.0)
Requirement already satisfied: pycparser in c:\users\appdata\local\programs\python\python38\lib\site-packages (from cffi!=1.13.1->pymunk) (2.20)
您有一个名为“pymunk.py”的本地文件。这是被导入而不是 pymunk。将您的文件名更改为其他名称。
我尝试安装 pymunk
,但安装验证测试 (python -m pymunk.tests test
) 失败:
>python -m pymunk.tests test
Traceback (most recent call last):
File "C:\Users\ayrto\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\ayrto\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\ayrto\pymunk.py", line 4, in <module>
space = pymunk.Space() # Create a Space which contain the simulation
AttributeError: partially initialized module 'pymunk' has no attribute 'Space' (most likely due to a circular import)
我是 运行 Python Win 10 中的 3.8.3。
pymunk 版本:
pip install pymunk
Requirement already satisfied: pymunk in c:\users\appdata\local\programs\python\python38\lib\site-packages (5.6.0)
Requirement already satisfied: cffi!=1.13.1 in c:\users\appdata\local\programs\python\python38\lib\site-packages (from pymunk) (1.14.0)
Requirement already satisfied: pycparser in c:\users\appdata\local\programs\python\python38\lib\site-packages (from cffi!=1.13.1->pymunk) (2.20)
您有一个名为“pymunk.py”的本地文件。这是被导入而不是 pymunk。将您的文件名更改为其他名称。