Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to fix Python path for some script/app?


    i have:
    # python -V
    Python 2.7.6

    But original for my CentOS is 2.3 or 2.4

    my python folder:
    (inside are folders like lib, include, bin, share)

    I launched app iotop:

    # iotop -od 6
    Traceback (most recent call last):
      File "/usr/bin/iotop", line 16, in ?
      File "/usr/lib/python2.4/site-packages/iotop/", line 567, in main
      File "/usr/lib/python2.4/site-packages/iotop/", line 557, in <lambda>
        main_loop = lambda: run_iotop(options)
      File "/usr/lib/python2.4/site-packages/iotop/", line 465, in run_iotop
    How can i modiffy python path for this application? so it work, or what is the cause/fix for above error please? Im total nooob

  2. #2
    Linux User
    Join Date
    Jan 2007
    usually the python support files are in /usr/lib
    maybe you can do something like this:

    ln -s /root/python2.7.6 /usr/lib/python2.7.6
    Last edited by tpl; 12-13-2013 at 02:04 PM.
    the sun is new every day (heraclitus)

  3. #3
    Linux Guru
    Join Date
    Dec 2013
    i don't know centos, but it seems weird that python is installed under /root.

    i din't see an actual error message in your output. i take it iotop doesn't work?
    also it has to be run with sudo, iirc.

    there's a couple of dirty hacks i can think of, but the cleanest solution would be to check your python environment - search for "centos python environment 2.4 2.7 " and/or install python 2.4 alongside 2.7

    does the file /usr/lib/python2.4/site-packages/iotop/ exist?
    can you open the file /usr/bin/iotop with a text editor and post the first 20 lines or so?

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts