Neuron on ubuntu 11.04 and sockets

Post Reply
angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Neuron on ubuntu 11.04 and sockets

Post by angela » Fri Jun 17, 2011 11:59 am

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

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

Re: Neuron on ubuntu 11.04 and sockets

Post by ted » Fri Jun 17, 2011 12:25 pm

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.

angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Re: Neuron on ubuntu 11.04 and sockets

Post by angela » Fri Jun 17, 2011 1:46 pm

and ............ what would i do ???????
even under Mac it doesn't work

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

Re: Neuron on ubuntu 11.04 and sockets

Post by ted » Fri Jun 17, 2011 7:42 pm

I asuumed you were installing from source code. You aren't?

angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Re: Neuron on ubuntu 11.04 and sockets

Post by angela » Sat Jun 18, 2011 8:47 am


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

Re: Neuron on ubuntu 11.04 and sockets

Post by ted » Sat Jun 18, 2011 11:12 pm

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

angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Re: Neuron on ubuntu 11.04 and sockets

Post by angela » Sun Jun 19, 2011 11:24 am

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

angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Re: Neuron on ubuntu 11.04 and sockets

Post by angela » Sun Jun 19, 2011 1:10 pm

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 :)????????

csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Re: Neuron on ubuntu 11.04 and sockets

Post by csh » Mon Jun 20, 2011 4:35 am

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

angela
Posts: 6
Joined: Fri Jun 17, 2011 11:53 am

Re: Neuron on ubuntu 11.04 and sockets

Post by angela » Tue Jun 21, 2011 9:06 am

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. ;)

csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Re: Neuron on ubuntu 11.04 and sockets

Post by csh » Tue Jun 21, 2011 3:01 pm

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

Post Reply