Kara-Moon Forum
May 03, 2024, 11:33:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Mac OS X version 10.5 user seeking installation advice  (Read 7036 times)
kanstulfan
Jr. Member
*
Posts: 5


« on: June 29, 2010, 07:44:49 AM »

I installed version 1.4 of mma on my Mac OS X 10.5 system some time ago using fink. That process worked flawlessly (thankyou!). However, fink seems to be unaware of version 1.6 of mma, which I would like to install. The instructions on how to install on a Mac on the mma website are seriously out of date for newer versions of Mac OS X, and point to directories that no longer exist.
Does anyone have any tips on how to install the current version of mma on a recentish version of Mac OS X?
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: June 29, 2010, 04:19:39 PM »


Disclaimer: I don't have a mac!

Apology: I don't dislike them ... just don't have one Smiley

The overall file structure of mma hasn't changed  at all since version 1.0. So, the "general" instructions should still apply. One important issue is the version of python you need. 2.4 or better. You will run into a problem with python 3.x due to the change in the python print statement, and probably other things.

So:

1. Make sure you have python 2.4 (or better) installed,

2. Unpack mma as per the directions on the web page,

You mention that some directory names have changed. Please let us know which. And let us know just what problems you're having, what point you get to, etc. We'd love to get you up and running and to update the instructions!

Best,
Logged

My online life: http://www.mellowood.ca
kanstulfan
Jr. Member
*
Posts: 5


« Reply #2 on: June 30, 2010, 01:37:25 PM »

Thanks very much for your reply. Much appreciated.

I have just looked now through the INSTALL document that comes with the distribution. I will highlight extracts from INSTALL below in bold.

I am running Python 2.6.5, according to output from 'python -V' command.

MMA consists of several parts. They should be installed as follows:

1. The main executable script, mma, should be in /usr/local/bin or
   somewhere else in your executable path.


Is 'mma' the same file as 'mma.py'? Am I supposed to rename this file, or set its permissions?

My $PATH is currently /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

Although my $PATH includes /usr/local/bin, this directory does not, in fact, exist.

2. A number of modules which MMA needs. They should be installed in
   /usr/local/share/mma/MMA.


What files are these "modules"? What folder in the distribution contains them? There is no folder named "modules".

3. Some other files used by the library and user extensions. These are
   installed in /usr/local/share/mma/includes.


There is currently no /usr/local/share directory on my machine, althogh /usr/local exists. I am unable to create such a directory (presumably a permissions issue). Which files are being referred to above? I am unsure what permissions I should be changing /usr/local to. I don't want to create a security hole on my machine.

4. The standard MMA library. These are a number of style files. They
   are installed in /usr/local/share/lib.


Again, this directory doesn't exist, and I don't appear to have permission to create it.

The install scripts supplied point to locations that do not exist by default in Mac OS X version 5.

I don't understand the nature of whatever dependencies are coded into mma. Presumably bits of the program assume that other bits are in certain places, and I don't understand what these assumptions are well enough to feel confident that I can start putting elements of the program in locations of my own choosing.

Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: June 30, 2010, 04:58:03 PM »


First off, I'll try to answer the questions, with suggested solutions. A "simple" solution is at the bottom of this post.

Quote
I have just looked now through the INSTALL document that comes with the distribution. I will highlight extracts from INSTALL below in bold.

I am running Python 2.6.5, according to output from 'python -V' command.

Good. After my post yesterday I tried Python 3.x and it doesn't work. As a side question I'm wondering when I need to do the conversion. I think the conversion itself won't be too much work, but I don't want to maintain 2 versions ...

Quote
MMA consists of several parts. They should be installed as follows:

1. The main executable script, mma, should be in /usr/local/bin or
   somewhere else in your executable path.


Is 'mma' the same file as 'mma.py'? Am I supposed to rename this file, or set its permissions?

Yes, and yes. It's just easier to type "mma" than "mma.py". In the install scripts I use the main exec is renamed. Your choice. I should add that one reason the exec is distributed as "mma.py" is due to my not-to-bright choice of using "MMA" as the name for the modules directory. If you run mma in a non-case-sensitive environment (DOS, windows) you'll run into a name problem if you have the modules MMA and the exec mma in the same directory.

The linux install scripts just copy "mma.py" to "mma". Permissions are already set.

Quote

My $PATH is currently /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

Although my $PATH includes /usr/local/bin, this directory does not, in fact, exist.

You should be able to create the directory /usr/local/bin simply by getting administrator rights. Someone with Mac-knowledge will need to give details here.  This might help:

  http://support.apple.com/kb/HT4103?viewlocale=en_US

Quote
2. A number of modules which MMA needs. They should be installed in
   /usr/local/share/mma/MMA.


What files are these "modules"? What folder in the distribution contains them? There is no folder named "modules".

Yes, these are the .py files in MMA. The exec looks for these in a number of locations:

     - in the directory in which the exec lives,
       /usr/local/share/mma,
       /usr/share/mma
      '.' -- your current directory

Quote

3. Some other files used by the library and user extensions. These are
   installed in /usr/local/share/mma/includes.


Again, mma looks for this file in the same location as above. This time it's looking for "lib" and "includes". So, wherever MMA lives, so should "lib".

Quote
There is currently no /usr/local/share directory on my machine, althogh /usr/local exists. I am unable to create such a directory (presumably a permissions issue). Which files are being referred to above? I am unsure what permissions I should be changing /usr/local to. I don't want to create a security hole on my machine.

Again, I'm not familiar with Mac permissions (to tell the truth, though, there's not a lot of difference  between mac and linux in this department). But, I would assume that the default permissions would be fine. Just change to root/admin and create the directory. Most likely: "sudo mkdir /usr/local/bin" or "sudo mkdir /usr/local/share/mma" will do just fine.

Quote
4. The standard MMA library. These are a number of style files. They
   are installed in /usr/local/share/lib.


Again, this directory doesn't exist, and I don't appear to have permission to create it.

Same issues, see above.

Quote
The install scripts supplied point to locations that do not exist by default in Mac OS X version 5.

You might want to try a few "simple" things.

1. try using the cp-install script ... pretend this is linux. You would need to use a command just like on linux "sudo cp-install" or perhaps "sudo python cp-install" If you get errors about the directories not existing, try creating them (above) and run it again.

2. You can run mma from the place you've extracted the tarball.

  - not recommended, but it works, is to move your song file to the root mma directory. Now, you can do something like "mma.py mysong" and it should work. Problem: all your songs need to be in the same location.

  - better, but I really think a proper install makes more sense, is to write a little script which will find your mma and compile the song. Something like a one line script (you'll need to work on this!): "/usr/MYNAME/MYDIR/somewhere/mma.py %s" should get you started.

However, a proper install should be easy enough! Please work though the suggestions above and let us (me) know what works, etc. We'll figure it out and then update the instructions (in the meantime I'm going to update some the stuff you've pointed out as out-of-date or confusing.

Question: Should the install scripts attempt to create directories? Perhaps I should have a little script "create directories" for new macs to create the /usr/local/share/mma directory, or just add it to the current (perhaps with a prompt). It appears that both linux and mac support the -p options so it'd be easy to have a line in the scripts "mkdir -p /usr/local/share/mma". Someone with a mac please reply!
Logged

My online life: http://www.mellowood.ca
kanstulfan
Jr. Member
*
Posts: 5


« Reply #4 on: July 01, 2010, 04:33:31 AM »

Thank you very much for your careful and detailed reply.

I figured out what command I needed to use to create the directory structure in Mac OS X version 5 that mma expects (sudo mkdir... followed by a fully qualified path). Can add only one directory at a time, of course.

Once I had created the directories, the cp-install script worked just fine.

My main problem then was that I still had an extent version of mma 1.4 that I had previously installed using fink. Issuing the mma -v command showed that this was still active. I then found with the "which" command where this version of mma was installed (/sw/bin/mma). I was able to uninstall the 1.4 version using fink, with some additional manual removal of files required after running fink.

I also found that running mma -G failed, with a message indicating initially that a CRITICAL error had occurred regarding "kara". When I deleted all the files in the kara directory, including the hidden .mmaDB file, and then the kara directory itself, the problem repeated with regard to the "yamaha" directory. I deleted this directory also, plus all its contents, and then I got a clean result for mma - G. I don't know if this issue is related to the method of installation I have used, or is caused by something else. I mentioned it in case it's related.

I now have a more-or-less properly installed instance of mma 1.6, I trust. I very much appreciate your speedy and accurate assistance.

With regard to your last question, I think it probably would be helpful if the install script felt its way along the path of each required directory, and created an entries not currently present.
« Last Edit: July 01, 2010, 07:09:46 AM by kanstulfan » Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: July 01, 2010, 06:14:53 PM »

Thank you very much for your careful and detailed reply.

And thank you for bearing with me and reporting back. Very useful.

I've modifed the ln/cp-install scripts so that the /usr/local/share and /usr/local/bin directories will be created (after a prompt) if they don't exist. BTW, I'm using "mkdir -p /usr/local/bin" ... the -p should work on OS X and saves me having to parse the directory tree and create each parent. Shout if that is a problem.

I'm not familar with fink ... looked at the home page and don't know enough about OS X to be much wiser ... but, you say it didn't work for the new install? I'm wondering if there is a problem or what ... or, even, if we should recommend it for mma installs? Mind you, the scripts should work fine so might be best to leave things alone.

Quote
I also found that running mma -G failed, with a message indicating initially that a

Please try again, but do it as root. "sudo mma -G" should work fine. I've changed the error message replacing "CRITICAL" with "are you root?"

Now ... create music and have fun!

Logged

My online life: http://www.mellowood.ca
xzzy
Newbie
*
Posts: 1


« Reply #6 on: August 02, 2010, 07:14:47 PM »

I just installed MMA on my Mac, registered just to give my feedback.

Short version: installation doesn't appear to be required.

I downloaded the mma-bin tarball, extracted it, and ran 'mma.py' on one of the examples. Produced a correct midi file right out of the box. This is on 10.6, but I see no reason why any earlier release with python 2.4 wouldn't work the same way (you can check the python version by running 'python -V').

This does mean the program isn't in your path, but this is pretty minor quibble and it means you don't have to massage an install script. Smiley
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #7 on: August 07, 2010, 12:10:59 AM »

Thanks for the feedback. And I hope you enjoy MMA!

The reason, as you pointed out, is for mma to be in your path you need to do the install. The install is pretty simple and should work fine on most unix-like systems. The alternates to doing an install is to write a short "batch" file and put that in your path or to do everything from your install location.

I really recommend doing the install Smiley
Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.047 seconds with 21 queries.