Eclipse with Python - having difficult with python version being picked up for egg file creation
Question: I am using CentOS with Python 2.6 (/usr/bin/python2.6) but I installed Python
2.7.8 (/usr/local/lib/python2.7).

The egg files (on running a script on eclipse get created
/usr/bin/python2.6/.. for the wrong version. I want it to get created in
/usr/local/bin/python2.7/..

    
    
    [code] [Desktop]$ which python
    alias python='python2.7'
    /usr/local/bin/python2.7 [/code]
    

The site-packages are present in /usr/local/lib/python2.7/site-packages

I have set the .bashrc file and PYTHONPATH to point to Python2.7 and checked
output of "python -v" and "which python" which seems correct.

Is there something else that I could be missing? I always keep getting this
error saying `"no module named pkg_resources"` found as a result of all this.

Thanks Lafada:

yum install python-setuptools There was a problem importing one of the Python
modules required to run yum. The error leading to this problem was:

/usr/local/lib/python2.7/site-packages/cStringIO.so: undefined symbol:
PyCapsule_New

Please install a package which provides this module, or verify that the module
is installed correctly.

It's possible that the above module doesn't match the current version of
Python, which is: 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7
20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to the yum faq at:
<http://yum.baseurl.org/wiki/Faq>

This clearly explains that there is some version issue/mix-up.. would you know
about this?

Update: I found something on stackoverflow which helped me on 2 packages but
not the others. I see the following on my Python Interpreters.

[code]

    
    
    /usr/local/lib/python2.7/site-packages/setuptools-5.4.1-py2.7.egg
    /usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg
    /usr/lib/python2.6/site-packages/nose-1.3.3-py2.6.egg
    /usr/lib/python2.6/site-packages/six-1.3.0-py2.6.egg
    /usr/local/bin/python2.7
    /usr/local/lib/python2.7/site-packag`enter code here`es
    /usr/lib64/python2.6
    /usr/lib64/python2.6/plat-linux2
    /usr/lib64/python2.6/lib-dynload
    /usr/lib64/python2.6/site-packages 
    /usr/lib64/python2.6/site-packages/gtk-2.0
    /usr/lib64/python2.6/site-packages/webkit-1.0
    /usr/lib/python2.6/site-packages
    /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info
    

[/code]

I need the packages referencing py2.6 to refer to py2.7 and create egg files
for 2.7.


Answer: You have to install `python-setuptools`

    
    
    apt-get install python-setuptools
    

This will install `pkg_resources` module

Hi Lafada:

I have responded to your comment by editing my question.

