somehow the installation of python is broken in my linux OEL 6.9.
pip or easy_install are broken and I cannot do anything.
i get the same error on both sides:
# easy_install
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/setuptools-39.2.0-py2.6.egg/pkg_resources/__init__.py", line 947, in <module>
class Environment(object):
File "/usr/lib/python2.6/site-packages/setuptools-39.2.0-py2.6.egg/pkg_resources/__init__.py", line 951, in Environment
self, search_path=None, platform=get_supported_platform(),
File "/usr/lib/python2.6/site-packages/setuptools-39.2.0-py2.6.egg/pkg_resources/__init__.py", line 180, in get_supported_platform
plat = get_build_platform()
File "/usr/lib/python2.6/site-packages/setuptools-39.2.0-py2.6.egg/pkg_resources/__init__.py", line 380, in get_build_platform
from sysconfig import get_platform
ImportError: No module named sysconfig
I removed python-setuptools to no avail.
I think i was trying to update latest version of pyOpenSSL and it crashed and cannot fix.
we are running Oracle enterprise Linux 6.6 in a VM.
how to fix it without resorting to installing python 2.7 which is not included in the official repos
thank you
sysconfig
doesn't exist in Python 2.6. It was introduced in Python 3.2 and backported to 2.7.setuptools
version atm? Did you installpython-setuptools
back after removal? It is vital for you to have it installed, otherwise you can forget about python packages.setuptools
dropped python 2.6 support since version 37, but it looks like you have version 39.2.0 for some reason. This will bork your python dist completely as you won't be able to install or uninstall anything, no matterpip
oreasy_install
. This should be the primary issue to solve right now.