osx - MAXREPEAT issue when running Python 2.7 from MacPorts -
i'm running issues running python2.7 macports.
here's list of available python versions:
$ sudo port select python available versions python: none python25-apple python26-apple python27 (active) python27-apple
when set python27
active (as above), following error when running python
:
$ sudo port select --set python python27 selecting 'python27' 'python' succeeded. 'python27' active. $ python traceback (most recent call last): file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 548, in <module> main() file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 530, in main known_paths = addusersitepackages(known_paths) file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages user_site = getusersitepackages() file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages user_base = getuserbase() # set user_base file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 231, in getuserbase user_base = get_config_var('userbase') file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/sysconfig.py", line 516, in get_config_var return get_config_vars().get(name) file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/sysconfig.py", line 449, in get_config_vars import re file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/re.py", line 105, in <module> import sre_compile file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/sre_compile.py", line 14, in <module> import sre_parse file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/sre_parse.py", line 17, in <module> sre_constants import * file "/opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/sre_constants.py", line 18, in <module> _sre import maxrepeat importerror: cannot import name maxrepeat
the version of port have installed (according sudo port installed
):
python27 @2.7.5_1 python27 @2.7.5_1+universal (active)
i not above error when running python2.7
, when run python
in shell.
$ python2.7 /opt/local/bin/python2.7 $ python /opt/local/bin/python
any suggestions?
thanks.
i experienced same issue. quick , easy workaround add alias in ~/.profile:
alias python='python2.7'
if don't have .profile file already, create one. open new instance of terminal , python should work fine no errors.
Comments
Post a Comment