1

所以我昨晚花了很多时间尝试安装 Nest(和 pynest)以与 PyNN 一起使用,但我目前被卡住了。当我尝试导入嵌套时,我得到:

>>> 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'
4

2 回答 2

1

尝试使用setuptools与.nesteasy_install python-nest

于 2015-01-24T13:12:21.540 回答
0

我正在尝试类似的东西,进一步的目标是让它与 python 3 一起工作。到目前为止,我使用了以下命令:

git clone https://github.com/nest/nest-simulator.git
cd nest-simulator
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/nest -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib .
make
make install

它运行没有错误,我可以愉快地运行嵌套。我仍然在运行 pyNN 时遇到问题(请参阅https://laurentperrinet.github.io/sciblog/posts/2016-06-01-compiling-and-using-pynn-%2B-nest-%2B-python3.html

于 2016-06-01T21:59:56.807 回答