Hello,
Thanks for making this program freely available! I've been using it for a bit now and find it very intuitive, and the integrated python shell is fantastic.
I really have two core questions. First, does stimfit support any version of python >= 3? And second, can I make the embedded python shell use an anaconda environment by default?
I've been writing some helper functions to make life easier, and I would like to start integrating outside dependencies. I use anaconda to manage virtual environments, and I'm having trouble getting stimfit to use the appropriate environment.
Below are the solutions I've tried already. Any guidance would be most appreciated!
-Matt
---------------------------------------------------------------------------------------------------------------------------------------------
First off, my OS is Ubuntu 16.04.
My first thought was to launch stimfit from a terminal within the anaconda environment. This almost works if the environment is a python3.6 environment, as running >>> sys.executable in the stimfit embedded shell indicates that it is using the correct python binary, but the embedded shell itself indicates it is python version 2.7 in the header. If I launch the binary that sys.executable points to from an outside terminal, the python interpreter says it is version 3.6. Additionally, I am unable to import the packages I know to be present in the environment.
My second thought was to do the same as before, but using a python2.7 environment. Launching from the terminal fails with the error message "ImportError: No module named wxversion". If I install wxPython using conda or pip, it tells me the version it fails with the error "Fatal Error: Mismatch between the program and library build versions detected." I assume this is because the version from the NeuroDebian repo is built with wxPython 3.0.2, whereas the only versions available from conda or pip are 3.0.0 and 2.9.1 respectively.
My third thought was to build from source using ./configure PYTHON=$HOME/path/to/conda/env/python --enable-python as described in the build guide. `./configure` works fine when building against the python3.6 environment, but `make` fails with error
"In file included from ../../../../src/stimfit/./gui/app.cpp:51:0:
../../../../src/stimfit/./gui/./app.h:208:34: fatal error: wx/wxPython/wxpy_api.h: No such file or directory
#include <wx/wxPython/wxpy_api.h>
I looked for wx packages in aptitude and found that libwxgtk3.0 and python-wxgtk3.0 are installed by default on Ubuntu 16.04, and I installed libwxgtk3.0-dev and python-wxgtk3.0-dev myself. But this still produced the same error.
And building against the python2.7 environment works, but launching stimfit fails with error
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8),
and wxNet used 3.0 (UTF-8,compiler with C++ ABI 1002,wx containers,compatible with 2.8).
Aborted (core dumped)
Based on the error message the python2.7 build fails because it builds using wxgtk3.0, but something in the program is only compatible with wx2.8? Which led me to wonder how it is that the NeuroDebian version indicates it is using 3.0.2?
I'm also not entirely sure why the 3.6 build fails, but I assume the root of the issue is that either wx or stimfit does not support python3.6? Instead of iterating backward through python versions in hopes that one will work, I thought it would be better to just ask!
---------------------------------------------------------------------------------------------------------------------------------------------------
Again, any advice you have for how to proceed would be greatly appreciated!