Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, i have: # python -V Python 2.7.6 But original for my CentOS is 2.3 or 2.4 my python folder: /root/python2.7.6 (inside are folders like lib, include, bin, share) I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    315

    How to fix Python path for some script/app?


    Hello,

    i have:
    # python -V
    Python 2.7.6

    But original for my CentOS is 2.3 or 2.4

    my python folder:
    /root/python2.7.6
    (inside are folders like lib, include, bin, share)

    I launched app iotop:

    Code:
    # iotop -od 6
    Traceback (most recent call last):
      File "/usr/bin/iotop", line 16, in ?
        main()
      File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 567, in main
        main_loop()
      File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 557, in <lambda>
        main_loop = lambda: run_iotop(options)
      File "/usr/lib/python2.4/site-packages/iotop/ui.py", 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
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    477
    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 Newbie nihili's Avatar
    Join Date
    Dec 2013
    Posts
    136
    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/ui.py exist?
    can you open the file /usr/bin/iotop with a text editor and post the first 20 lines or so?

Posting Permissions

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