You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_depends.sh is expecting there to be a virtual environment named 'oeEnv'. If you have anaconda installed, you can accomplish this by conda create -n oeEnv python=3.6 cython=0.28.2
This will create a virtual environment with versions of python and cython that work with this plugin. I am realizing in the documentation we say that we recommend using a virtual environment instead of saying it is required. My apologies! See if that cleans up your issues.
Thank you very much for your prompt response! I was able to compile the PythonPlugin such that a .bundle file is created. However, after moving it to the PlugIns within my open_ephys application files, the PythonPlugin is not part of the filters. Do you know how to resolve this?
Also, I have a hypothetical question regarding the PythonPlugin. Would I be able to use this in conjunction with a Python script for real time processing of the stream of electrode data?
Thank you. It seems like this will do exactly as I had hoped!
In terms of the .bundle file, I have it in my /open-ephys/Contents/PlugIns directory. However, after restarting and opening the open_ephys application, the PythonPlugin is not an option, as shown in the following screenshots.
Do you know why this may be occurring?
Thanks again for your help. It is greatly appreciated.
There is probably an error code that is being printed out that would be helpful. With open ephys up and running and Xcode running, is there some text in the bottom right corner? In there it might say something like “dll error loading PythonPlugin”. The text after that should help us figure out what is going on.
I seem to be running into another issue when building. I am getting the following error: ld: library not found for -l-l clang: error: linker command failed with exit code 1 (use -v to see invocation)
As you can see, I am running the Xcode project in a virtual environment.
Do you know what may be causing this issue?
You said you moved the bundle right? Thinking it can't find it. Can check to see if that is the problem by attempting to navigate to the path found below "The following build commands failed: " in your image.
The bundle is in the open-ephys.app, so I don't believe that is the issue.
I have tried a number of things, including a fresh reinstall, and still have not been able to determine the issue.
it looks like some setting for linking libraries is somehow not set. in the compilation command there's twice in a row "-l -l" but no library is specified (eg -lPython3.6) so the linker interprets the second "-l" as a library that obviously doesn't exist, hence the error...
Here is how it looks like for me
Ld /Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns/PythonPlugin.bundle/Contents/MacOS/PythonPlugin normal x86_64 (in target: PythonPlugin) cd /Users/fpbatta/src/PythonPlugin/Builds/MacOSX export MACOSX_DEPLOYMENT_TARGET=10.12 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns -F/Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns -filelist /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin.LinkFileList -Xlinker -rpath -Xlinker /usr/local/anaconda/envs/oeEnv/lib -mmacosx-version-min=10.12 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin_lto.o -Xlinker -export_dynamic -stdlib=libc++ -lpython3.6m -lpython3.6m -undefined dynamic_lookup -undefined dynamic_lookup -L/usr/local/anaconda/envs/oeEnv/lib -undefined dynamic_lookup -undefined dynamic_lookup -L/usr/local/anaconda/envs/oeEnv/lib -bundle -undefined dynamic_lookup -Xlinker -dependency_info -Xlinker /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin_dependency_info.dat -o /Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns/PythonPlugin.bundle/Contents/MacOS/PythonPlugin
I think the PYTHON_VERSION somehow is not substituted so you may need to rerun get-depends.sh?
@crcali and @jsiegle navigate to the Config directory (PythonPlugin/Builds/MacOSX/Config) and run bash get-depends.sh
Let me know what you get as the output. I get: /Users/ClaytonBarnes/anaconda3/envs/oeEnv python3.6m
You might get an error about line 23 but that's okay.
@crcali it seems the detection script isn't finding any version of python. I don't know if running the build from the command line would prevent the detection script from running? Could try to build with the Xcode GUI and see if that works.
@jsiegle it seems it isn't linking with the static python library. Are you using anaconda? Did you create a virtual environment?
Thank you for your ideas! I have attempted to run it from the Xcode GUI as well, but it also doesn't build properly.
When I run the bash command, I get the following output, along with the line 23 error: /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7
get_depends.sh is printing out //anaconda/envs/py36 as the $PYTHON_DIR variable. However, the PYTHON_DIR seems correct in Plugin.xconfig (//anaconda/envs/oeEnv)
I did have to change #include <Python.h> to #include <Python/Python.h> to get PythonPlugin.h to compile, so it makes sense that might be picking up the system Python instead.
Where do we expect Python.h to be found? Somewhere in the Anaconda environment directory?
It now compiles normally if I add /anaconda/envs/oeEnv/include/python3.6m to the list of header search paths, but it's still failing with the same error.
Yeah linking python can be a nightmare, which is why the detection script is so great. Wonder if there is a difference in your file structure that is preventing proper linking. @fpbattaglia made the script, perhaps he could help out?
@jsiegle, it does look like it is somehow still pointing at the system python or in any case not to the anaconda virtual env, because Python.h is directly under ...envs/oeEnv/include/python3.6m and there's no Python directory there.
Currently, in get_depends I source ~/.bash_profile to get the PATH env variable, so could it be that there you are not pointing to the anaconda folder (which means you can't activate the virtual environment?)
Activity
Claybarn commentedon Jun 11, 2019
Hey Christopher.
get_depends.sh is expecting there to be a virtual environment named 'oeEnv'. If you have anaconda installed, you can accomplish this by
conda create -n oeEnv python=3.6 cython=0.28.2This will create a virtual environment with versions of python and cython that work with this plugin. I am realizing in the documentation we say that we recommend using a virtual environment instead of saying it is required. My apologies! See if that cleans up your issues.
crcali commentedon Jun 11, 2019
Hello,
Thank you very much for your prompt response! I was able to compile the PythonPlugin such that a .bundle file is created. However, after moving it to the PlugIns within my open_ephys application files, the PythonPlugin is not part of the filters. Do you know how to resolve this?
Also, I have a hypothetical question regarding the PythonPlugin. Would I be able to use this in conjunction with a Python script for real time processing of the stream of electrode data?
Thanks again for your help.
Best,
Christopher
Claybarn commentedon Jun 11, 2019
I believe the .bundle should already be in the right place! No movement is necessary.
And to answer your question, absolutely! The n_arr variable of the bufferfunction is the electrode data.
crcali commentedon Jun 12, 2019
Thank you. It seems like this will do exactly as I had hoped!
In terms of the .bundle file, I have it in my /open-ephys/Contents/PlugIns directory. However, after restarting and opening the open_ephys application, the PythonPlugin is not an option, as shown in the following screenshots.


Do you know why this may be occurring?
Thanks again for your help. It is greatly appreciated.
Best,
Christopher
Claybarn commentedon Jun 12, 2019
There is probably an error code that is being printed out that would be helpful. With open ephys up and running and Xcode running, is there some text in the bottom right corner? In there it might say something like “dll error loading PythonPlugin”. The text after that should help us figure out what is going on.
crcali commentedon Jun 12, 2019
I seem to be running into another issue when building. I am getting the following error:

ld: library not found for -l-l clang: error: linker command failed with exit code 1 (use -v to see invocation)As you can see, I am running the Xcode project in a virtual environment.
Do you know what may be causing this issue?
Thanks again,
Christopher
Claybarn commentedon Jun 13, 2019
You said you moved the bundle right? Thinking it can't find it. Can check to see if that is the problem by attempting to navigate to the path found below "The following build commands failed: " in your image.
crcali commentedon Jun 13, 2019
The bundle is in the open-ephys.app, so I don't believe that is the issue.
I have tried a number of things, including a fresh reinstall, and still have not been able to determine the issue.
Thanks again for all your help!
Christopher
fpbattaglia commentedon Jun 13, 2019
it looks like some setting for linking libraries is somehow not set. in the compilation command there's twice in a row "-l -l" but no library is specified (eg -lPython3.6) so the linker interprets the second "-l" as a library that obviously doesn't exist, hence the error...
Here is how it looks like for me
Ld /Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns/PythonPlugin.bundle/Contents/MacOS/PythonPlugin normal x86_64 (in target: PythonPlugin) cd /Users/fpbatta/src/PythonPlugin/Builds/MacOSX export MACOSX_DEPLOYMENT_TARGET=10.12 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns -F/Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns -filelist /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin.LinkFileList -Xlinker -rpath -Xlinker /usr/local/anaconda/envs/oeEnv/lib -mmacosx-version-min=10.12 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin_lto.o -Xlinker -export_dynamic -stdlib=libc++ -lpython3.6m -lpython3.6m -undefined dynamic_lookup -undefined dynamic_lookup -L/usr/local/anaconda/envs/oeEnv/lib -undefined dynamic_lookup -undefined dynamic_lookup -L/usr/local/anaconda/envs/oeEnv/lib -bundle -undefined dynamic_lookup -Xlinker -dependency_info -Xlinker /Users/fpbatta/Library/Developer/Xcode/DerivedData/PythonPlugin-gfjhfwatakjmweahsivcqgdzuyos/Build/Intermediates.noindex/PythonPlugin.build/Debug/PythonPlugin.build/Objects-normal/x86_64/PythonPlugin_dependency_info.dat -o /Users/fpbatta/src/PythonPlugin/build/Debug/open-ephys.app/Contents/PlugIns/PythonPlugin.bundle/Contents/MacOS/PythonPluginI think the PYTHON_VERSION somehow is not substituted so you may need to rerun get-depends.sh?
jsiegle commentedon Jun 18, 2019
I'm also having issues getting the plugin to load on macOS (version 10.12).
It's giving the following error when trying to load the PythonPlugin:
Any idea about what's going on?
Claybarn commentedon Jun 19, 2019
Hmm have been a good amount of changes to the plugin recently. Will check to see if one of them caused it.
Claybarn commentedon Jun 19, 2019
@crcali and @jsiegle navigate to the Config directory (PythonPlugin/Builds/MacOSX/Config) and run
bash get-depends.shLet me know what you get as the output. I get:
/Users/ClaytonBarnes/anaconda3/envs/oeEnv python3.6mYou might get an error about line 23 but that's okay.
@crcali it seems the detection script isn't finding any version of python. I don't know if running the build from the command line would prevent the detection script from running? Could try to build with the Xcode GUI and see if that works.
@jsiegle it seems it isn't linking with the static python library. Are you using anaconda? Did you create a virtual environment?
crcali commentedon Jun 19, 2019
Hi,
Thank you for your ideas! I have attempted to run it from the Xcode GUI as well, but it also doesn't build properly.
When I run the bash command, I get the following output, along with the line 23 error:
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7Do you know what may be causing this?
Thanks!
Christopher
Claybarn commentedon Jun 19, 2019
Have you installed anaconda? It is trying to use the version of python that comes with the mac which is not supported.
jsiegle commentedon Jun 19, 2019
get_depends.shis printing out//anaconda/envs/py36as the$PYTHON_DIRvariable. However, thePYTHON_DIRseems correct in Plugin.xconfig (//anaconda/envs/oeEnv)I did have to change
#include <Python.h>to#include <Python/Python.h>to get PythonPlugin.h to compile, so it makes sense that might be picking up the system Python instead.Where do we expect
Python.hto be found? Somewhere in the Anaconda environment directory?Claybarn commentedon Jun 19, 2019
I believe it is in `anaconda3/envs/oeEnv/include/python3.6m'. What is your PYTHON_VERSION variable?
jsiegle commentedon Jun 19, 2019
python3.6m
jsiegle commentedon Jun 19, 2019
It now compiles normally if I add
/anaconda/envs/oeEnv/include/python3.6mto the list of header search paths, but it's still failing with the same error.Claybarn commentedon Jun 20, 2019
Yeah linking python can be a nightmare, which is why the detection script is so great. Wonder if there is a difference in your file structure that is preventing proper linking. @fpbattaglia made the script, perhaps he could help out?
fpbattaglia commentedon Jun 21, 2019
@jsiegle, it does look like it is somehow still pointing at the system python or in any case not to the anaconda virtual env, because Python.h is directly under
...envs/oeEnv/include/python3.6mand there's noPythondirectory there.Currently, in get_depends I source
~/.bash_profileto get the PATH env variable, so could it be that there you are not pointing to the anaconda folder (which means you can't activate the virtual environment?)