Menu

help installing in non standard directory

Help
mf625
2005-07-26
2013-04-25
  • mf625

    mf625 - 2005-07-26

    Hi,

    I try to install gnome-sudoku on a slackware 10.1 box, with gnome 10.0. I spent a lot of time compiling the zillions  necessary python bindings (Gtk, gnome,  gnome extras, orbit, gnome-abcxyzetc.), but still it does not work. My python is installed in $HOME/sw/python. "python setup.py build" is ok now, but "python setup.py install" fails with this error:

    creating /usr/local/lib/python2.4
    error: could not create '/usr/local/lib/python2.4': Permission denied

    Other python packages I installed managed to detect where is my python distribution and properly choosed the correct directory. In the INSTALL file you say "You can use --prefix to change the base of your installation (the default will be /usr/local/)" but I confess I do not know how to use this option. Pls help!

     
    • tom

      tom - 2005-07-27

      python setup.py install --prefix=/foo/

       
    • mf625

      mf625 - 2005-07-27

      Thanks, "python setup.py install --prefix=/home/user/software/games/gnome-sudoku-0.2.1" installs indeed in the required directory.

      I start the game and get this:

      $ pwd
      /home/user/software/games/gnome-sudoku-0.2.1/bin

      $ ./gnome-sudoku
      Traceback (most recent call last):
        File "./gnome-sudoku.bak", line 11, in ?
          from gnome_sudoku.gnome_sudoku import start_game
      ImportError: No module named gnome_sudoku.gnome_sudoku

      $ cat gnome-sudoku.bak
      #!/home/user/software/bin/python
      # Copyright (c) 2005 Tom Hinkle You may use and distribute this
      # software under the terms of the GNU General Public License, version
      # 2 or later

      import sys

      sys.path.append('/usr/share/')

      from gnome_sudoku.gnome_sudoku import start_game
      start_game()

      -----

      After changing the line "sys.path.append('/usr/share/')" to
      sys.path.append('/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/')

      I get the following (syntax?) error:

      user@pepper:~/software/games/gnome-sudoku-0.2.1/bin]
      $ ./gnome-sudoku
      starting timer
      Default to  8 0 1 0 0 4 0 0 0 0 0 0 0 6 0 0 5 0 3 0 2 7 0 0 0 0 6 0 9 0 0 4 0 0 0 7 2 0 0 3 0 9 0 0 5 1 0 0 0 5 0 0 2 0 6 0 0 0 0 7 4 0 2 0 7 0 0 8 0 0 0 0 0 0 0 6 0 0 3 0 9
      Strange
      Traceback (most recent call last):
        File "./gnome-sudoku", line 12, in ?
          start_game()
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/gnome_sudoku.py", line 792, in start_game
          u = UI()
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/gnome_sudoku.py", line 340, in __init__
          9)
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/gsudoku.py", line 303, in change_grid
          self.setup_grid(grid,group_size)
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/gsudoku.py", line 339, in setup_grid
          if val: self.add(x,y,val)
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/gsudoku.py", line 389, in add
          self.grid.add(x,y,val,True)
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/sudoku.py", line 515, in add
          SudokuGrid.add(self,x,y,val,*args,**kwargs)
        File "/home/user/software/games/gnome-sudoku-0.2.1/lib/python2.4/site-packages/gnome_sudoku/sudoku.py", line 125, in add
          if val in self.rows[y]:
      TypeError: unhashable type

      -------------

      Any ideas? Thanks!

       

Log in to post a comment.