SWC files

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Kolorek
Posts: 20
Joined: Wed Jan 28, 2015 3:48 pm

Re: SWC files

Post by Kolorek » Fri Feb 20, 2015 12:32 pm

in python I have this :

Code: Select all

Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 14:30:37) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>> import neuron
Found NEURON at C:\Python27\neuronhome
>>> 
If i open nrngui_python version 7.3 for mnswig and import neuron I have this

Code: Select all

See http://www.neuron.yale.edu/neuron/credits

first instance of j
first instance of itmp
first instance of using_cvode_
first instance of movie_frame_dur_
first instance of realtime
first instance of running_
first instance of rtstart
first instance of stdrun_quiet
first instance of screen_update_invl
first instance of tstop
first instance of steps_per_ms
first instance of nstep_steprun
first instance of runStopAt
first instance of runStopIn
first instance of global_ra
first instance of mapped_nrnmainmenu_
first instance of v_init
first instance of n_graph_lists
first instance of i
first instance of eventslow
first instance of eventcount
first instance of cnt
>>> import neuron
Found NEURON at C:\Python27\neuronhome
>>>
If i open nrngui_python version 7.4 alpha I have this

Code: Select all

Attempt to fix nrniv failure using: eval "`mk_nrnpyenv.sh`" failed.
c:/nrn74w64/lib/neuron2.sh: line 1: /c/nrn74w64/bin64/nrniv: Bad file number

NEURON exited abnormally. Press the return key to close this window

Kolorek
Posts: 20
Joined: Wed Jan 28, 2015 3:48 pm

Re: SWC files

Post by Kolorek » Tue Feb 24, 2015 11:00 am

I remove/unistall pyNEURON 7.2 and now I only have NEURON 7.3
I do steps which was write here http://www.neuron.yale.edu/phpbb/viewto ... f=5&t=2604
When I write import neuron I don't have any messages :(
but when I write from neuron import h
h.neuronhome() I have this message:
"C:\python27\nrn73w"

I must add all dll files to python27\nrn73w\lib\python\neuron
because if I don't do this then I have this error:
ImportError: DLL load failed: The specified procedure could not be found.

Could you explain in steps how to do that and I should have the same message like you

Code: Select all

>>> import neuron
NEURON -- VERSION 7.4 (1332:477da879a623) 2015-02-11
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

ramcdougal
Posts: 153
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

Re: SWC files

Post by ramcdougal » Fri Mar 06, 2015 10:59 am

I just set up NEURON for 32-bit Python on Windows 7 on my machine. Here's how:
  • Install Windows 7
  • Install PythonXY
  • Install the latest "alpha" version of NEURON 7.4 (for 32-bit, this is currently 1232+.i686)
  • Set PYTHONPATH to include C:\nrn74w\lib\python and set NEURONHOME to C:\nrn74w. (See here for information on how to set environment variables on Windows. If you already have PYTHONPATH set, append this path to it with a semicolon.)
  • Open a terminal (in Windows, you can launch "cmd" or a custom terminal... The NEURON install puts a "NEURON 7.4 i686" folder on your desktop; you can launch "bash" from there if you prefer.)
  • Launch Python: "python"
  • "from neuron import h, gui, rxd"
This is what it looks like on my machine, running from cmd:

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\r>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from neuron import h, gui, rxd
Unable to load 'mpich2nemesis.dll', error 126
NEURON -- VERSION 7.4 (1232+:ff78f40d7044+) 2015-03-05
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

>>>
PythonXY is just a choice, but it's what I used this time. It's one of several collections that provide both Python and a large number of supporting modules (e.g. NumPy, SciPy, etc). Since you want to use NEURON's rxd module, you need at least NumPy and SciPy in addition to the standard Python modules.

(Ignore the complaint about mpich2... that just means I don't have MPI installed. Before 7.4 is officially released, we'll remove the complaint.)

Kolorek
Posts: 20
Joined: Wed Jan 28, 2015 3:48 pm

Re: SWC files

Post by Kolorek » Tue Mar 10, 2015 5:37 pm

Dear ramcdougal
I have done every step that you have write and from NEURON side everything works. I have only error from Visual Studio Just-In-Time Debugger

Post Reply