0

After recompiling python2.7 and mod_wgsi I now get these errors within my virtual environment when trying to run pip or easy_install.

# pip-2.7 install pexpect
Traceback (most recent call last):
  File "/production/pythonenv/django15/bin/pip-2.7", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/production/pythonenv/django15/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 16, in <module>
  File "/production/pythonenv/django15/lib/python2.7/re.py", line 105, in <module>
    import sre_compile
  File "/production/pythonenv/django15/lib/python2.7/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/production/pythonenv/django15/lib/python2.7/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/production/pythonenv/django15/lib/python2.7/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT

However if I go into python I can import _sre but it doesnt seem have the correct method available.

>>> import _sre
>>> dir(_sre)
['CODESIZE', 'MAGIC', '__doc__', '__name__', '__package__', 'compile', 'copyright', 'getcodesize', 'getlower']

Any ideas ... Thanks,

felix001
  • 15,341
  • 32
  • 94
  • 121

0 Answers0