[pypy-issue] Issue #2241: Unexpected sys import error when trying to run cffi embedding test (pypy/pypy)

lahwran issues-reply at bitbucket.org
Thu Feb 18 14:21:56 EST 2016

New issue 2241: Unexpected sys import error when trying to run cffi embedding test


When I run build.sh in this repo:


I get this error:


the pypy version is in build.sh; you'll have to modify the path to pypy in build.sh to reproduce it exactly, and I'm running the actual build script from a venv that points to that same pypy. the latest generated code is in py/my_plugin.c. 

system: this is on mac 10.9.5. I use iterm2, and I was running the shell in neovim; my shell is bash 4.3.30, and I use gnu coreutils. I have many homebrew packages installed, many of which have libraries; if you'd like to see the list of these and their versions, I can add them, but it's 100+. I also have torch7 installed, and it is the sole thing on my default DYLD_LIBRARY_PATH.

Btw, I'd really like documentation of what you have to do to go from python embedding api to binary that uses it; that's what I've been trying to figure out here, and the docs were missing the part where I have to name the file libmy_plugin.dylib in order to actually use it as -Lmy_plugin - I had to learn of that from google. They were also missing the part about needing the libpypy-c lib and stdlib, I learned of that requirement from irc.

More information about the pypy-issue mailing list