Page 1 of 1

Neuron on ubuntu 11.04 and sockets

Posted: Fri Jun 17, 2011 11:59 am
by angela
hello,
i'm traying to install Neuron 7.1 on ubuntu 11.4 but it failed ; the error is in
"ligne 64 in setup.py " i need help
thanks

Re: Neuron on ubuntu 11.04 and sockets

Posted: Fri Jun 17, 2011 12:25 pm
by ted
Suggest instead that you get the latest alpha version or the very latest development code from the mercurial repository. There have been many changes since 7.1, and many users have compiled under Ubuntu, so if the problem is with the NEURON config &/or make files, it's likely to have been fixed. Not to mention bugs in NEURON itself that will have been fixed.

Re: Neuron on ubuntu 11.04 and sockets

Posted: Fri Jun 17, 2011 1:46 pm
by angela
and ............ what would i do ???????
even under Mac it doesn't work

Re: Neuron on ubuntu 11.04 and sockets

Posted: Fri Jun 17, 2011 7:42 pm
by ted
I asuumed you were installing from source code. You aren't?

Re: Neuron on ubuntu 11.04 and sockets

Posted: Sat Jun 18, 2011 8:47 am
by angela

Re: Neuron on ubuntu 11.04 and sockets

Posted: Sat Jun 18, 2011 11:12 pm
by ted
Then get the tar.gz file for the latest alpha version, expand it, and compile it. The link to the page that tells how is on this page
http://www.neuron.yale.edu/neuron/download
and is called
"Alpha" version installers and development code

Re: Neuron on ubuntu 11.04 and sockets

Posted: Sun Jun 19, 2011 11:24 am
by angela
ok thanks i do exactly what they say every thik was ok till :
Installation with Python as an alternative interpreter
i've got this even when the mercurial version

Code: Select all

........................................................
Python binary found (/usr/bin/python2.7)
checking nrnpython configuration... get_python_version()  '2.7'
sys.version_info.major  '2'
get_python_inc(1)  '/usr/include/python2.7'
get_config_var('LIBS')  '-lpthread -ldl  -lutil'
get_config_var('LINKFORSHARED')  '-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions'
get_config_var('LIBDIR')  '/usr/lib'
checking if python include files and libraries work... configure: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
	PYLIB=-L/usr/lib -lpython2.7 -lpthread -ldl  -lutil -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -R/usr/lib
or
	PYLIBDIR=/usr/lib
or
	PYLIBLINK=-L/usr/lib -lpython2.7 -lpthread -ldl  -lutil
or
	PYINCDIR=/usr/include/python2.7
but found in the forum that i need python.h and libpython2.7 so i qownload python 2.7 from the source and install it i four the python.h and the libpython i have it :)
good please where is the probléme :| ??????????????????????????
and another question is it possible to connect neuron with another progremùm by sokets :) thanks for your help :)

Re: Neuron on ubuntu 11.04 and sockets

Posted: Sun Jun 19, 2011 1:10 pm
by angela
okok it's done but with the mercurial version and just i do exactly what it's on http://www.davison.webfactional.com/not ... on-python/
and thanks for your answers but :) is til dont know if is it possible to connect my programme (C++) to neuron via sockets :)????????

Re: Neuron on ubuntu 11.04 and sockets

Posted: Mon Jun 20, 2011 4:35 am
by csh
angela wrote:and thanks for your answers but :) is til dont know if is it possible to connect my programme (C++) to neuron via sockets :)????????
I don't think that neuron natively supports sockets. What do you want to achieve?

C

Re: Neuron on ubuntu 11.04 and sockets

Posted: Tue Jun 21, 2011 9:06 am
by angela
thanks for your answer, I want to communicate NEURON with other software without a swap file, (with sockets)
it's like if the software controlle Neuron. ;)

Re: Neuron on ubuntu 11.04 and sockets

Posted: Tue Jun 21, 2011 3:01 pm
by csh
angela wrote:thanks for your answer, I want to communicate NEURON with other software without a swap file, (with sockets)
it's like if the software controlle Neuron. ;)
You could use Python as the glue between NEURON and your program.
Here's a very simple Python script:

Code: Select all

#! /usr/bin/python

from neuron import hoc
import subprocess
import socket

if __name__=="__main__":

    # Start C++ program:
    subprocess.Popen(["./nrnsocket"])
    
    # Set up socket:
    s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    s.bind("\0nrnsocket")
    s.listen(1)
    conn, addr = s.accept()
    
    # Receive msg from C++:
    data = conn.recv(4096)

    # Send to hoc:
    h = hoc.HocObject()
    h(data)
Hope that helps.
Christoph