March 22nd, 2005, 06:55 PM
-
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
March 22nd, 2005, 07:06 PM
-
Is the module located in the site-packages directory?
March 22nd, 2005, 07:08 PM
-
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.
March 22nd, 2005, 07:16 PM
-
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?
March 22nd, 2005, 09:25 PM
-
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....
March 23rd, 2005, 04:50 AM
-
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.
March 23rd, 2005, 12:12 PM
-
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
March 23rd, 2005, 05:10 PM
-
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.
March 23rd, 2005, 05:17 PM
-
I thought "sudo" was "superuser do"... how can the superuser do anything if the account is disabled?
March 23rd, 2005, 05:33 PM
-
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.