LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   python packages error (https://www.linuxquestions.org/questions/linux-newbie-8/python-packages-error-4175511734/)

sachin.davra 07-21-2014 06:48 AM

python packages error
 
Hi,

I am using centos 6 x86. I am experiencing some issues while installing python packages using easy_install. Could any one please help to resolve this issue. Any help is appreciated.
Code:

[root@SYS-1587 1.1]# easy_install djcelery
Traceback (most recent call last):
  File "/usr/local/python2.7/bin/easy_install", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/python2.7/lib/python2.7/site-packages/distribute-0.6.25-py2.7.egg/pkg_resources.py", line 17, in <module>
    from urlparse import urlparse, urlunparse
  File "/usr/local/python2.7/lib/python2.7/urlparse.py", line 110, in <module>
    from collections import namedtuple
  File "/usr/local/python2.7/lib/python2.7/collections.py", line 9, in <module>
    from operator import itemgetter as _itemgetter
ImportError: /usr/local/python2.7/lib/python2.7/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString
[root@SYS-1587 1.1]#


Code:

That "_PyUnicodeUCS4_AsDefaultEncodedString" error usually means that you are mixing two different Python builds (a UCS2 build and a UCS4 build).

Try setting the python to use the Komodo prebuilt Python:

export KOPYPATH=/home/matic/Downloads/openKomodo/mozilla/prebuilt/python2.6/linux-x86_64
export PATH=$KOPYPATH/bin:$PATH
export LD_LIBRARY_PATH=$KOPYPATH/lib:$LD_LIBRARY_PATH

I found some thing while surfing around. could you make me understand the meaning of lines which are highlighted.


business_kid 07-21-2014 11:12 AM

Python always gives you the graphic tailspin - blow by blow.

Code:

ImportError: /usr/local/python2.7/lib/python2.7/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString
That seems to be the bit to react to. Look for python modules for your distro as the lazy way out.

sachin.davra 07-22-2014 01:25 AM

Quote:

Originally Posted by business_kid (Post 5207301)
Python always gives you the graphic tailspin - blow by blow.

Code:

ImportError: /usr/local/python2.7/lib/python2.7/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString
That seems to be the bit to react to. Look for python modules for your distro as the lazy way out.

This is fresh installed python with UCS4. I am not able to install python modules.

business_kid 07-22-2014 03:50 AM

compiled? Then you need source, and probably a lot of modules. Look for a python-modules package.

Perl has cpan, which works, but python doesn't have anything like it.


All times are GMT -5. The time now is 01:45 AM.