[英]Run Blender from python script
我正在尝试学习如何从外部python脚本运行Blender命令,我正在从GitHub阅读本教程。 但是,当我运行第一个测试blender -b -P run_script.py
,出现以下错误消息:
Read new prefs: /home/sim/.config/blender/2.76/config/userpref.blend
RNA_def_property_ui_text: 'option_extra_vgroups' '' description ends with a '.' ! RNA_def_property_ui_text: 'option_index_type' '' description ends with a '.' !
Traceback (most recent call last): File "/home/sim/Desktop/WebApp/Blender/blender-scripting-master/run_script.py", line 22, in <module>
exec(compile(open(file).read(), scriptFile, 'exec'))
File "fisher_iris_visualization.py", line 3, in <module>
import numpy as np ImportError: No module named 'numpy'
然后搅拌机退出
您有解决的主意吗? 提前非常感谢您!
似乎您没有在脚本中导入numpy
模块。
我的猜测是,没有任何代码,调试起来并不容易。
我看起来好像没有在系统上安装numpy库。
你可以核实吗?
python -c 'import numpy; numpy.test()'
如果出现错误,请使用以下命令安装numpy
sudo apt-get install python-numpy
要么
pip install --user numpy
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.