#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15

    installing modules


    i got a mac recently and i am trying to install some python modules and i am having some problems:

    whenever i do:

    Code:
    python setup.py build
    python setup.py install
    i get an error:

    Code:
    error: could not create '/usr/local/lib/python2.4/site-packages/moduleName': Permission denied
    i don't know why. i've tried chmod-ing the folder(s), and i've tried using su ; but i don't know if i am using it correctly.

    so...what should i do?

    thanks
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Is the module located in the site-packages directory?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15
    Originally Posted by †Yegg†
    Is the module located in the site-packages directory?

    no, that's where it's trying to install it to.

    the build and install go fine until it tries to create the folder for the module before it copies the files to it.
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    O, I see. Well, I'm not sure if it's the Mac that is causing the problem, but maybe you should just create (if you didn't already try this) the folder on your own and see if it works then. Other than that, I have no clue what would be causing that error. The folder doesn't already exist, right?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15
    Originally Posted by †Yegg†
    O, I see. Well, I'm not sure if it's the Mac that is causing the problem, but maybe you should just create (if you didn't already try this) the folder on your own and see if it works then. Other than that, I have no clue what would be causing that error. The folder doesn't already exist, right?

    it doesn't already exist, and it gives me the same error if i try to make it myself. just using mkdir....
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    How are you using 'su'?

    Code:
    user@macosx:/$ su
    please enter the password: 
    root@macosx:/# mkdir /usr/local/lib/python2.4/site-packages/moduleName
    root@macosx:/# exit
    
    user@macosx:/$
    (Temporary grab for superuser permissions)
    Is how I would expect it to work.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15
    Originally Posted by sfb
    How are you using 'su'?

    thanks, i got it to work. i was trying su and it wasn't working with my password...but root isn't enabled by default as i found out here:

    http://developer.apple.com/documenta...nfluences.html


    Enabling the Root User

    Although the root user is disabled by default, an administrative user can reenable it and acquire superuser status. To reenable the root user, do the following:

    1.

    Launch the NetInfo Manager application in /Applications/Utilities.
    2.

    Choose Security > Enable Root User. (This menu is enabled only if you are an authenticated member of the local admin group.)

    The root user password is blank by default. When you enable the account, you are prompted for a root password automatically. You should always provide a root password for security reasons

    ...and then it worked with no problem.

    thanks guys
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I missed a good Mac discussion . Anyway, it is advised that you don't enable the root account unless you really have to – for security reasons. Instead you should use the sudo command i.e.

    Code:
    Mark-Smiths-Computer:~ Mark$ sudo mkdir /usr/local/lib/python2.4/site-packages/moduleName
    Just out of interest have you installed any other versions of Python yet or are you still using Apples default installation? If you've installed your own this may have been the problem depending: on of you installed Python 2.x as a framework or not .

    Anyway have fun guys,

    Mark.
    programming language development: www.netytan.com Hula

  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    I thought "sudo" was "superuser do"... how can the superuser do anything if the account is disabled?
  18. #10
  19. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    The root account is disabled by default, this means that you can't use su or log in to take control of the system however the account is still there. In fact all you need to do to enable the the account is to open provide a password (and or use NetInfo), which takes about 2 min as Admin .

    Make sense?

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo