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

"Error: Failed to find python version from target process" on macOS #15

Closed
jhrmnn opened this issue Sep 7, 2018 · 5 comments
Closed

Comments

@jhrmnn
Copy link

jhrmnn commented Sep 7, 2018

I'm getting this error for a Pyenv-installed Python running an Ipython kernel. Running with RUST_LOG=info, I get

 INFO 2018-09-07T06:14:57Z: py_spy::python_spy: Getting version from python binary BSS
 INFO 2018-09-07T06:14:57Z: py_spy::python_spy: Failed to get version from BSS section: failed to find version string
 INFO 2018-09-07T06:14:57Z: py_spy::python_spy: Trying to get version from path: /Users/hermann/.pyenv/versions/3.6.6/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
Error: Failed to find python version from target process
@benfred
Copy link
Owner

benfred commented Sep 8, 2018

thanks for the bug report! I'm having some issues replicating though, I installed python 3.6.6 through pyenv on osx using pyenv install 3.6.6 and everything worked.

I think your pyenv installation is different, it looks like you have a 'Python.app' style python distribution (like the system python/homebrew) instead of the one I got from pyenv which I believe just compiled the source. Do you remember how you installed it? My guess is that I'm failing to find the correct libpython from your distribution.

Also could you paste the full log? The libpython filename should be something like '/usr/local/Cellar/python/3.6.4_2/Frameworks/Python.framework/Versions/3.6/Python' (homebrew) or '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (system python).

@jhrmnn
Copy link
Author

jhrmnn commented Sep 8, 2018

I installed the Pyenv Python as a framework to have a Python shared library

env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.6.6

The full log from trying to run PySpy is here: https://gist.github.com/776cd807a34eb8d37b37a8547c282fe0

The Python app is, I think, in /Users/hermann/.pyenv/versions/3.6.6/Python.framework/Versions/Current/Python

benfred added a commit that referenced this issue Sep 9, 2018
We weren't matching the python framework appropiately for python built with
pyenv when configured with '--enable-framework' (#15)
Fix and add a unittest.
@benfred
Copy link
Owner

benfred commented Sep 9, 2018

thanks! I hadn't tested python built on OSX with "--enable-framework". I have a fix here: 08b9871, and will be in the next release

@benfred
Copy link
Owner

benfred commented Sep 10, 2018

fix is in v0.1.5

@benfred benfred closed this as completed Sep 10, 2018
@jhrmnn
Copy link
Author

jhrmnn commented Sep 10, 2018

Thanks! Works for me now as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants