0

A library we use depends on another library called Jellyfish. That library implements logic where if there's a cpython version, it'll import that. If not, it'll use the pypy version.

Pypy has a known issue (reference: https://github.com/jamesturk/jellyfish/issues/46) where the pypy implementation of the metaphone library has an inconsistency with the cpython version.

Looking inside of the virtual environments of my colleagues, they all have the file cjellyfish.cpython-34m.so created upon installation, but I don't. As a result, my code behaves differently from theirs (we end up on other sides of this try/except: https://github.com/jamesturk/jellyfish/blob/master/jellyfish/init.py)

I'm curious about why my system doesn't have the cjellyfish.cpython-34m.so file but other ones do. Admittedly, this is likely because I'm not very familiar with what goes on as part of the pip install process, and at what stage compilation may occur.

So I have a few questions, all of which are likely related: 1) Is there anything you can think of that would cause the file to not be generated? 2) Is there a place I can look for that would have error/log messages that in the event of a failed compilation? 3) Can someone explain or point me towards a resource about what happens within the process of pip install somelibrary that generates the compiled cpython.so files?

My system info:

  • Ubuntu 18.04
  • Python 3.4.3 running in pyenv
  • Platform version is #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018
  • platform.python_implementation() is CPython locally (matches that of my colleagues)
  • platform.python_compiler() is 'GCC 7.3.0' which is different from my colleagues (GCC 4.4.7 20120313 (Red Hat 4.4.7-11) for example)
Robert Townley
  • 3,414
  • 3
  • 28
  • 54
  • Depends on how it is installed. `.so` file is not always necessary. Usually python will search first for the `.so` file and then for a `.py` file. Running `strace -o trace_output.txt python` shows you how it works. – user3543300 Jan 07 '19 at 22:32

1 Answers1

0

1 That issue was fixed and closed

2 You should examine the output of pip install --log /tmp/metaphone.txt --ignore-installed metaphone and the /tmp/metaphone.txt log file to see if you are missing a component needed to build the *.so

mattip
  • 2,360
  • 1
  • 13
  • 13