gpt4 book ai didi

python - 导入错误: cannot import name pynestkernel

转载 作者:太空宇宙 更新时间:2023-11-03 17:58:27 25 4
gpt4 key购买 nike

所以我昨晚尝试安装 Nest(和 pynest)以与 PyNN 一起使用,但目前我陷入了困境。当我尝试导入 Nest 时,我得到:

>>> import nest
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nest/__init__.py", line 52, in <module>
from . import pynestkernel as _kernel
ImportError: cannot import name pynestkernel

但是,当我进行 make installcheck 时,它通过了所有 pynest 测试。我使用的是 OS x Yosemite,并且使用 macport 重新安装了 python 2.7.9。

尝试过:

easy_install python-nest

现在我收到一个新错误。

获取:

>>> import pyNN.nest as sim

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pyNN.nest as sim
File "/Library/Python/2.7/site-packages/pyNN/nest/__init__.py", line 13, in <module>
from pyNN.nest import simulator
File "/Library/Python/2.7/site-packages/pyNN/nest/simulator.py", line 500, in <module>
state = _State() # a Singleton, so only a single instance ever exists
File "/Library/Python/2.7/site-packages/pyNN/nest/simulator.py", line 60, in __init__
self._cache_num_processes = nest.GetKernelStatus()['num_processes'] # avoids blocking if only some nodes call num_processes
AttributeError: 'module' object has no attribute 'GetKernelStatus'

最佳答案

尝试使用setuptools通过easy_install python-nest安装nest

关于python - 导入错误: cannot import name pynestkernel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28125220/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com