Menu

#35 gdb and python problem

1.0
closed
nobody
None
2017-02-05
2014-04-16
owlcn
No

I use pacman install mingw-w64-i686-gdb, run gdb and get error message:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

When I set $PYTHONHOME=/mingw32/lib/python2.7, I get the error message:

ImportError: No module named site

How can I solve this problem, thx

Related

Tickets: #35

Discussion

  • Alexx83

    Alexx83 - 2014-04-16

    Provide more info. I don't have this error. How you start GDB - from MSYS or from CMD? Does mingw-w64-i686-python2 installed?

     
  • owlcn

    owlcn - 2014-04-16

    start gdb from MSYS2(mingw32_shell.bat),mingw-w64-i686-python2 installed.
    I test in 2 pcs,win7 x64 and xp sp3,both problems.

     
  • owlcn

    owlcn - 2014-04-16

    pacman -Sl info in txt file.

     
  • Alexx83

    Alexx83 - 2014-04-16

    I see what is wrong :)
    You need update packages to latest. Just run:
    pacman -Syu

    Regards,
    Alexey.

     
    👎
    1
  • owlcn

    owlcn - 2014-04-16

    I start gdb in CMD, no error info output, working properly.
    but in MSYS2, error again.

     
  • Alexx83

    Alexx83 - 2014-04-16

    Do you restart MSYS2 after packages upgrade? If no then do it.

     
    👎
    1
  • owlcn

    owlcn - 2014-04-16

    I have upgrade all packages,and run autorebase.
    But still have a problem.

    Help,please~

     
    • Ray Donnelly

      Ray Donnelly - 2014-04-16

      Do you have done weird environment variables set? PYTHONHOME etc?
      On Apr 16, 2014 12:48 PM, "owlcn" owllyi@users.sf.net wrote:

      I have upgrade all packages,and run autorebase.
      But still have a problem.

      Help,please~

      Attachment: pacman2.txt (37.3 kB; text/plain)

      Status: open
      Milestone: 1.0
      Created: Wed Apr 16, 2014 05:16 AM UTC by owlcn
      Last Updated: Wed Apr 16, 2014 08:06 AM UTC
      Owner: nobody

      I use pacman install mingw-w64-i686-gdb, run gdb and get error message:

      Could not find platform independent libraries
      Could not find platform dependent libraries
      Consider setting $PYTHONHOME to [:]
      ImportError: No module named site

      When I set $PYTHONHOME=/mingw32/lib/python2.7, I get the error message:

      ImportError: No module named site

      How can I solve this problem, thx

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/msys2/tickets/35/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #35

  • Alexx83

    Alexx83 - 2014-04-16

    On CMD it work fine?

     
  • owlcn

    owlcn - 2014-04-16

    not set any PYTHON variables.
    On CMD,it work fine.

    GNU gdb (GDB) 7.7
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "i686-w64-mingw32".

     
  • Alexx83

    Alexx83 - 2014-04-16

    Show output of "printenv" command please

     

    Last edit: Alexx83 2014-04-16
  • LiTuX

    LiTuX - 2014-04-16

    I know this issue, in my msys, running gbd from bash or cmd lead to the same result:

    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    ImportError: No module named site
    

    In my case, I've set the environment variable to solve the problem: export PYTHONHOME=/mingw32 is enough.

     
  • Alexx83

    Alexx83 - 2014-04-16

    I think that it about your environment because I and some other peoples don't have this issue.
    Show "printenv" output

     
  • owlcn

    owlcn - 2014-04-17

    export PYTHONHOME=/mingw32

    @LiTux,working,thx very much~~~

    env int txt file,please check.

     
  • Alexx83

    Alexx83 - 2014-12-02

    Does this issue still happened?

     
  • David Macek

    David Macek - 2017-02-05
    • status: open --> closed
     
  • David Macek

    David Macek - 2017-02-05

    Closing due to age, hopefully fixed by now.

    If not, just call export PYTHONHOME=c:/msys64/mingw64/;c:/msys64/mingw64/share/gdb/python before calling gdb.

     

    Last edit: Johannes Schindelin 2017-07-19