我已尝试在模拟器 Webots(7.0.3)中导入 numpy ,它已成功使用,直到多次主管< / strong>恢复模拟。它出现了这些错误消息:
Traceback (most recent call last):
File "PyController.py", line 39, in <module>
from numpy import *
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 170, in <module>
from . import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 11, in <module>
from . import numeric
File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line 1103, in <module>
os.environ.update(envbak)
File "C:\Python27\lib\os.py", line 461, in update
self[k] = dict[k]
File "C:\Python27\lib\os.py", line 422, in __setitem__
putenv(key, item)
ValueError: the environment variable is longer than 32767 bytes
恢复功能是管理员机器人的原始功能,可以在Webots模拟器中调用:
supervisor.simulationRevert()
任何人都可以帮我解决这个问题吗?谢谢!