New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homebrew python breaks #186

Closed
psifertex opened this Issue Mar 8, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@psifertex
Member

psifertex commented Mar 8, 2016

Running python plugins in homebrew's python results in:

Fatal Python error: PyThreadState_Get: no current thread

Explanation for the error: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Common-Issues.md#python-segmentation-fault-11-on-import-some_python_module

Need to figure out a good way around it.

@psifertex psifertex added the bug label Mar 8, 2016

@psifertex

This comment has been minimized.

Show comment
Hide comment
@psifertex

psifertex Mar 8, 2016

Member

Temporary workaround: just use the native python:

PYTHONPATH=$PYTHONPATH:/Applications/Binary\ Ninja.app/Contents/Resources/python python

Member

psifertex commented Mar 8, 2016

Temporary workaround: just use the native python:

PYTHONPATH=$PYTHONPATH:/Applications/Binary\ Ninja.app/Contents/Resources/python python

@D0ntPanic

This comment has been minimized.

Show comment
Hide comment
@D0ntPanic

D0ntPanic Mar 25, 2016

Member

Fixed in development

Member

D0ntPanic commented Mar 25, 2016

Fixed in development

@D0ntPanic D0ntPanic closed this Mar 25, 2016

@psifertex psifertex modified the milestone: v1 Jun 7, 2016

@Manouchehri

This comment has been minimized.

Show comment
Hide comment
@Manouchehri

Manouchehri Dec 14, 2016

Could you reopen this? Homebrew still screws Python up in Binja because #391 is not true on macOS.

nitro:~ dave$ otool -L /Applications/Binary\ Ninja.app/Contents//MacOS/plugins/libpythonplugin.dylib
/Applications/Binary Ninja.app/Contents//MacOS/plugins/libpythonplugin.dylib:
	@loader_path/libpythonplugin.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
	@rpath/libbinaryninjacore.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)
>>> sys.path
['/Users/dave/Library/Application Support/Binary Ninja/plugins', '/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']

Manouchehri commented Dec 14, 2016

Could you reopen this? Homebrew still screws Python up in Binja because #391 is not true on macOS.

nitro:~ dave$ otool -L /Applications/Binary\ Ninja.app/Contents//MacOS/plugins/libpythonplugin.dylib
/Applications/Binary Ninja.app/Contents//MacOS/plugins/libpythonplugin.dylib:
	@loader_path/libpythonplugin.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
	@rpath/libbinaryninjacore.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)
>>> sys.path
['/Users/dave/Library/Application Support/Binary Ninja/plugins', '/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']
@Manouchehri

This comment has been minimized.

Show comment
Hide comment
@Manouchehri

Manouchehri Dec 14, 2016

This seems to work:

nitro:~ dave$ DYLD_FRAMEWORK_PATH=/usr/local/opt/python/Frameworks /Applications/Binary\ Ninja.app/Contents/MacOS/binaryninja

Manouchehri commented Dec 14, 2016

This seems to work:

nitro:~ dave$ DYLD_FRAMEWORK_PATH=/usr/local/opt/python/Frameworks /Applications/Binary\ Ninja.app/Contents/MacOS/binaryninja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment