Skip to content
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

Installation problems: Fatal Python error: PyThreadState_Get: no current thread #88

Closed
matteomanca opened this issue Oct 17, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@matteomanca
Copy link

commented Oct 17, 2016

Dear all,

I'm trying to install snap for python (https://snap.stanford.edu/snappy/index.html) on my mac OSX but I get the following error:

"Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6"

Any idea?
Thanks in advance.

Matteo

@roks

This comment has been minimized.

Copy link
Contributor

commented Oct 18, 2016

@ThomsonZeng

This comment has been minimized.

Copy link

commented Feb 9, 2018

This is caused by linking a static version of libpython into ycmd's ycm_core.so. This leads to multiple copies of the python interpreter loaded when python loads ycmd_core.so and this messes up python's global state. The details aren't important.

The solution is that the version of Python linked and run against must be built with either --enable-shared or --enable-framework (on OS X). This is achieved as follows (NOTE: for Mac, replace --enable-shared with --enable-framework):

When building python from source: ./configure --enable-shared {options}
When building python from pyenv: PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install {version}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.