我正在阅读这个,当它说我应该使用命令python -m ursina.build
来编译我的项目。当我启动。bat文件时,我得到了这个错误
package_folder: C:UserssbahrOneDriveDocumentsprogrammingPythonMeshGamebuildpythonlibsite-packagesursina
asset_folder: src
screen resolution: (1920, 1080)
Traceback (most recent call last):
File "C:UserssbahrOneDriveDocumentsprogrammingPythonMeshGamemain.py", line 3, in <module>
from mesh import ChunkManager
File "C:UserssbahrOneDriveDocumentsprogrammingPythonMeshGamemesh.py", line 19, in <module>
from noise import generateSaveNoise
File "C:UserssbahrOneDriveDocumentsprogrammingPythonMeshGamenoise.py", line 3, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
我运行pip install numpy
,它说numpy已经安装了。
这曾经是自动的,但在新版本的Python中被破坏了。因此,如果使用了额外的模块,则必须提供一个要复制的额外模块列表。来自ursina的文档(https://www.ursinaengine.org/building.html):
确保包含任何额外的模块,例如
--include_modules PIL,numpy
。