Neuron on ubuntu 11.04 and sockets

Post Reply
angela

Neuron on ubuntu 11.04 and sockets

Post 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
ted
Site Admin
Posts: 6289
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 »

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

Re: Neuron on ubuntu 11.04 and sockets

Post by angela »

and ............ what would i do ???????
even under Mac it doesn't work
ted
Site Admin
Posts: 6289
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 »

I asuumed you were installing from source code. You aren't?
ted
Site Admin
Posts: 6289
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 »

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

Re: Neuron on ubuntu 11.04 and sockets

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

Re: Neuron on ubuntu 11.04 and sockets

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

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

Re: Neuron on ubuntu 11.04 and sockets

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

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