2015-01-05 39 views
1

當試圖導入庫(它是運行numerical neuronal simulations的「神經元」庫)的解釋,我只是失去了命令無限期地提示沒有錯誤時:Python的命令提示符消失試圖導入

kjb:~ ken$ python 
Python 2.7.8 |Anaconda 1.9.0 (x86_64)| (default, Jul 2 2014, 15:36:00) 
... 
>>> import neuron 
_ 

下劃線表示遊標。

我明白,這可能是一個問題神經元本身,其他的模塊,如數學進口沒有問題,但是我想知道我應該如何着手弄清楚什麼是錯的?我在這裏相當缺乏經驗。

謝謝!

+0

嘗試使用Ctrl + C和看堆棧跟蹤說什麼。然後你可以搜索神經元+錯誤信息。 – tdelaney

+0

你也可以試試這個:python -m trace --trace your_prog.py –

回答

0

一般來說,它是更容易通過與-python標誌開始神經元第一使用與神經元的Python:

nrniv -python 

nrgui -python 

這與Python解釋器啓動神經元

NEURON -- VERSION 7.4 (1373:f15dcfc7847b) f15dcfc7847b 
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015 
See http://www.neuron.yale.edu/neuron/credits 

你可以在那裏運行python com mands:

>>> import sys 
>>> sys.version_info 
sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0) 
>>> quit() 

更具挑戰性的路線是先啓動蟒蛇,然後導入神經細胞庫

$ python 
Python 2.7.11 (default, Dec 5 2015, 14:44:47) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import neuron 
NEURON -- VERSION 7.4 (1373:f15dcfc7847b) f15dcfc7847b 
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015 
See http://www.neuron.yale.edu/neuron/credits 

要啓動蟒蛇,然後導入神經元庫,您需要:

在MS Windows上,install PyNEURON

pip install PyNEURON 

在其他操作系統的,從源代碼和安裝神經元Python庫編譯神經元

  1. Compile NEURON from source with python support
  2. Setup the NEURON library for python