I am trying to build the Neuron 7.1 source as a Python module for my own custom Python installation under Windows 7.
After spending more than 20 hours struggling with this and after going through all relevant posts in the forum (which are inconclusive for the most part) I decided to take a shot in the forum myself.
So, what I did:
1)Install Cygwin according to the instructions here: http://www.neuron.yale.edu/neuron/download/getcygwin . I downloaded cygwin and properly installed all the required packages as outlined in the link above. The whole procedure seems to work fine and no errors were observed.
2)Downloaded the source for both InterViews and Neuron from here: http://www.neuron.yale.edu/neuron/download/getstd
3)Copied the tarballs in my newly created HOME directory under my user folder in the Cygwin directory
4)Based on the instructions by Andrew Davison here: http://www.davison.webfactional.com/not ... on-python/ and the various posts I found in the forum I did the following:
a)Go to the directory where neuron is extracted
b)I have managed configuring and making InterViews but in this case I will only write the steps without IV (have tried them out as well on a different machine)
c)I configure neuron. I have tried a ton of different configurations mentioned here in the forum to no avail. If I do not use python then the configure works, however no configuration that includes python works:
This one (no Python) works:
Code: Select all
./configure --prefix=`pwd` --without-iv
In order to avoid the above error and include python I have tried the following:
Code: Select all
./configure --prefix=`pwd` --without-iv --disable-cygwin --with-nrnpython
Code: Select all
configure:20517: 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/python2.5/config -lpython2.5 -ldl -R/usr/lib/python2.5/config
or
PYLIBDIR=/usr/lib/python2.5/config
or
PYLIBLINK=-L/usr/lib/python2.5/config -lpython2.5 -ldl
or
PYINCDIR=/usr/include/python2.5
Code: Select all
./configure --prefix=`pwd` --without-iv --without-memacs --with-readline=no --without-nmodl --disable-cygwin --with-nrnpython
Lastly, I tried this one where I try to link to my 'custom' installation which a 2.6 python version, part of the Enthought Distribution 32bit package:
Code: Select all
./configure --prefix=`pwd` --without-iv --disable-cygwin --with-nrnpython=/cygdrive/c/Python26/python PYLIBDIR=/cygdrive/c/Python26/libs PYINCDIR=/cygdrive/c/Python26/include PYLIBLINK="-L/cygdrive/c/Python26/libs -lpython26 -ldl" PYLIB="-L/cygdrive/c/Python26/libs -lpython26 -ldl"
Code: Select all
configure:20517: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
PYLIB=-L/cygdrive/c/Python26/libs -lpython26 -ldl
or
PYLIBDIR=/cygdrive/c/Python26/libs
or
PYLIBLINK=-L/cygdrive/c/Python26/libs -lpython26 -ldl
or
PYINCDIR=/cygdrive/c/Python26/include
Code: Select all
configure:20484: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "nrn"
| #define PACKAGE_TARNAME "nrn"
| #define PACKAGE_VERSION "7.1"
| #define PACKAGE_STRING "nrn 7.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nrn"
| #define VERSION "7.1"
| #define DISCRETE_EVENT_OBSERVER 1
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define IVOS_DECLARE_TRUE
| #define YYTEXT_POINTER 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define USE_PYTHON 1
| /* end confdefs.h. */
|
| #include <Python.h>
|
| int
| main ()
| {
|
| Py_Initialize();
| Py_Finalize();
| return 0;
|
| ;
| return 0;
| }
configure:20517: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
PYLIB=-L/cygdrive/c/Python26/libs -lpython26 -ldl
or
PYLIBDIR=/cygdrive/c/Python26/libs
or
PYLIBLINK=-L/cygdrive/c/Python26/libs -lpython26 -ldl
or
PYINCDIR=/cygdrive/c/Python26/include
Of course I have checked the paths and they work fine. Actually if I just write 'python' in the cygwin console, python opens up normally.
Is there something I am missing? Is there some magical way to get Neuron to build under Windows with Python? I should note that I tried to configure and build the same code under an Ubuntu box and it seems to work fine.
Any help, comments, suggestions or advice of any sort will be appreciated :D