tiagocoutinho/multivisor

python2.6.6 pip install -U pip Error occurred

YJiWei opened this issue · 3 comments

#=============================================
environment:centos6.9,python2.6.2
can you help me? Seek the help of the big man。
#=============================================

pip install -U pip

Traceback (most recent call last):
File "/usr/bin/pip", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources/init.py", line 959, in
class Environment:
File "/usr/lib/python2.6/site-packages/pkg_resources/init.py", line 963, in Environment
self, search_path=None, platform=get_supported_platform(),
File "/usr/lib/python2.6/site-packages/pkg_resources/init.py", line 190, in get_supported_platform
plat = get_build_platform()
File "/usr/lib/python2.6/site-packages/pkg_resources/init.py", line 393, in get_build_platform
from sysconfig import get_platform
ImportError: No module named sysconfig
#=============================================

I also get some problems with centos6 and python 2.6. I think a different message than this. I'll be watching this thread to see what comes up! Thanks, David

Ok, so a couple of things:

  • I should have written down somewhere and make it clear on setup.py that multivisor needs python >= 2.7 (work in active to support python 3. See #31).
  • Even if we solve this particular error, I cannot make any guarantees that multivisor works on python 2.6 (some of the dependencies like flask, gevent or zerorpc might not work)

Looks like this particular problem is not directly related to multivisor but an internal setuptools mess.
But let's to try to solve your problem:

Option 1: create a separate environment

This is my real answer here. Use your python favourite python virtual environment (I use miniconda) to create a python 2.7 environment and run multivisor from here.

Another option is pew.

Option 2: you need to stick with the system python

This is only if you absolutely without any other chance need to stick with the system python.
Looks like pkg_resources is deployed by setuptools.
Can you try to install setuptools first and then pip:

$ pip install -U setuptools
$ pip install -U pip

I don't have any python 2.6 environment to test with so I am not sure if this works and solves your problem.

I am closing this since it doesn't seem to be directly related to multivisor