Page 3 of 3

Re: Neuron as Python module in Win (again)

Posted: Fri Sep 20, 2013 2:31 pm
by jditte
Thank you, Michael. I will give it a try. I assume that Neuron cannot be run from inside Canopy's interactive shell ("Editor") then (because the Python environment isn't set up to find Neuron)...

Best,

Jochen

Re: Neuron as Python module in Win (again)

Posted: Fri Sep 20, 2013 9:15 pm
by hines
from the canopy shell you can try
import sys
sys.path.append('c:\\nrn73w64\\lib\\python')
from neuron import h

It is not clear to me how you would set the NEURONHOME environment variable but if it is set correctly then
h.neuronhome()
should print
c:/nrn73w64

Re: Neuron as Python module in Win (again)

Posted: Thu Feb 26, 2015 2:43 pm
by Kolorek
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.

Now the problem is that I don't have this message:

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
and when I run program which was written in python (in pyNEURON library it works fine) I have only blank line :(
I need NEURON 7.3 because I need rxd to finish my program

I work on Windows 7 N profesionall 32 bit-version and I use python version Python 2.7.3

Please help :(

Re: Neuron as Python module in Win (again)

Posted: Tue Mar 03, 2015 11:01 am
by ted
Kolorek wrote: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
The URL in your message is damaged. Somehow the stuff between
viewto
and
f=5
was left out, so all that remains is this:

Code: Select all

http://www.neuron.yale.edu/phpbb/viewto ... f=5&t=2604
Fortunately that doesn't matter, because f=5&t=2604 points to this very discussion thread.

Re: Neuron as Python module in Win (again)

Posted: Thu Mar 05, 2015 3:37 am
by Kolorek
Thank you Ted now it should be ok with the URL
but still i don't know how to fix my problem
If I should write some more information just say
I really don't know how to fix the problem :(

Re: Neuron as Python module in Win (again)

Posted: Thu Mar 05, 2015 10:53 am
by ted
Kolorek, you are very close to being banned from the Forum for spamming. I am removing the reposts of your messages, and if you do that again, your access to the Forum will be supended for two weeks.

I understand that you are desperate for assistance. However, delays in answering a question may happen for many reasons--maybe it's taking a while for someone to figure out what the answer should be, or maybe the people who know the answer have other urgent tasks that they must complete. If you think that a message of yours has not been noticed, or has been forgotten, it is enough to post a message with a short reminder, maybe something like this:
Can anyone answer my question from Thu Mar 05, 2015?

Re: Neuron as Python module in Win (again)

Posted: Thu Mar 05, 2015 5:38 pm
by hines
Do you have a 32 or 64 bit windows machine?
If the latter, install a 64 bit version of enthought canopy python. Then install
http://www.neuron.yale.edu/ftp/neuron/v ... -setup.exe
From the NEURON program group start a bash terminal and in that try
python
from neuron import h, gui

exit using NEURONMainMenu/File/Quit

Re: Neuron as Python module in Win (again)

Posted: Thu Mar 05, 2015 6:02 pm
by hines
if you have a 32 bit windows machine try installing:
http://www.neuron.yale.edu/ftp/neuron/v ... -setup.exe
and then, as above, in a bash terminal
python
from neuron import h
import scipy
quit()

also, please let me know if either of the following give error messages

nrniv -python
from neuron import h
import scipy
quit()

nrniv_enthought -python
from neuron import h
import scipy
quit()