awahlig / python-pcre

Python bindings for PCRE regex engine.
BSD 3-Clause "New" or "Revised" License
57 stars 12 forks source link

Unable to import pcre #12

Open ohenrik opened 7 years ago

ohenrik commented 7 years ago

Ok, i'm lost. I have installed pcre with homebrew. However this does not seem to work as it seems like it is missing `jit´.

I tried installing pcre on my own however the guides i could find did not work on macOS Sierra. Does any one have any tips on this?

>>> import pcre
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/pcre.py", line 29, in <module>
    import _pcre
ImportError: dlopen(/usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so, 2): Symbol not found: _pcre_assign_jit_stack
  Referenced from: /usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so
  Expected in: flat namespace
 in /usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so
gzcf commented 7 years ago

I installed pcre from source and encountered the same problem.

These are steps I installed pcre and python-pcre.

cd ~/Downloads/pcre-8.35
./configure --disable-stack-for-recursion --enable-unicode-properties --enable-utf
make
make install

cd ~/Downloads/python-pcre
python setup.py build install