Neuron as Python module in Win (again)

jditte
Posts: 5
Joined: Wed Mar 20, 2013 3:40 pm

Re: Neuron as Python module in Win (again)

Post by jditte » Fri Sep 20, 2013 2:31 pm

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

hines
Site Admin
Posts: 1517
Joined: Wed May 18, 2005 3:32 pm

Re: Neuron as Python module in Win (again)

Post by hines » Fri Sep 20, 2013 9:15 pm

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

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

Re: Neuron as Python module in Win (again)

Post by Kolorek » Thu Feb 26, 2015 2:43 pm

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 :(

ted
Site Admin
Posts: 5334
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Neuron as Python module in Win (again)

Post by ted » Tue Mar 03, 2015 11:01 am

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.

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

Re: Neuron as Python module in Win (again)

Post by Kolorek » Thu Mar 05, 2015 3:37 am

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 :(

ted
Site Admin
Posts: 5334
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Neuron as Python module in Win (again)

Post by ted » Thu Mar 05, 2015 10:53 am

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?

hines
Site Admin
Posts: 1517
Joined: Wed May 18, 2005 3:32 pm

Re: Neuron as Python module in Win (again)

Post by hines » Thu Mar 05, 2015 5:38 pm

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

hines
Site Admin
Posts: 1517
Joined: Wed May 18, 2005 3:32 pm

Re: Neuron as Python module in Win (again)

Post by hines » Thu Mar 05, 2015 6:02 pm

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()

Post Reply