I have a problem with python on my Ubuntu 12.10.
Firstly the problem arose when I was trying to reinstall nautilus because of some troubles with it. I used
apt-get --reinstall install nautilus*. The installation was successful, but nautilus was unable to run because of python error:
grigory@grigory:/usr/local$ nautilus Initializing nautilus-gdu extension Initializing nautilus-image-converter extension Initializing nautilus-dropbox 0.7.1 Initializing nautilus-open-terminal extension Initializing nautilus-ideviceinfo extension Traceback (most recent call last): File "/usr/local/lib/python2.7/site.py", line 548, in <module> main() File "/usr/local/lib/python2.7/site.py", line 530, in main known_paths = addusersitepackages(known_paths) File "/usr/local/lib/python2.7/site.py", line 266, in addusersitepackages user_site = getusersitepackages() File "/usr/local/lib/python2.7/site.py", line 241, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/usr/local/lib/python2.7/site.py", line 231, in getuserbase USER_BASE = get_config_var('userbase') File "/usr/local/lib/python2.7/sysconfig.py", line 516, in get_config_var return get_config_vars().get(name) File "/usr/local/lib/python2.7/sysconfig.py", line 449, in get_config_vars import re File "/usr/local/lib/python2.7/re.py", line 105, in <module> import sre_compile File "/usr/local/lib/python2.7/sre_compile.py", line 14, in <module> import sre_parse File "/usr/local/lib/python2.7/sre_parse.py", line 17, in <module> from sre_constants import * File "/usr/local/lib/python2.7/sre_constants.py", line 18, in <module> from _sre import MAXREPEAT ImportError: cannot import name MAXREPEAT
I searched through google and stackoverflow and found out that the problem could be caused by some problems with python versions: with cx_Freeze, something else and others. Namely, the problem is connected with updating from python 2.7.3 to newer versions.
Recently I was stupid enough to install python 2.7.5 manually from sources. And now I have 2 pythons installed: 2.7.3 in
/usr/bin/ and python 2.7.5 in
/usr/local/bin/. I suppose the problem is somehow connected with this fact.
The links provided above deal with python
virtualenv, but in my case there is no virtualenv, I guess. Although I am a kind of newbie to Ubuntu and python, so I can mistake.
What can I do to solve the issue? Thank you in advance!