cgre-aachen / pynoddy

pynoddy is a python package to write, change, and analyse kinematic geological modelling simulations performed with Noddy.
GNU General Public License v2.0
71 stars 31 forks source link

Installing noddy on Mac OS #13

Open mycarta opened 7 years ago

mycarta commented 7 years ago

Hi there,

I am wonderign if you had any expereice with, or can point to any resources on how to install noddy on a mac.

I successfully cloned and installed pynoddy, then in the noddy directory I tried this:

Macintosh-5:~ matteoniccoli$ cd GitHub/pynoddy
Macintosh-5:pynoddy matteoniccoli$ cd noddy
Macintosh-5:noddy matteoniccoli$ ./adjust_for_MacOSX.sh
Macintosh-5:noddy matteoniccoli$ ./compile.sh
-bash: ./compile.sh: Permission denied

but I get a permission problem.

mycarta commented 7 years ago

I see you suggest as an alternative to download a precompiled version from here: https://github.com/flohorovicic/pynoddy/tree/master/noddyapp I am fairly new to this kind of installations. Where would you recommend copying the noddy_precompiled_MacOSX and is there anything else that needs to be done? Thank you!

If I try:

Macintosh-5:~ matteoniccoli$ cd GitHub/pynoddy
Macintosh-5:pynoddy matteoniccoli$ ./noddy_precompiled_MacOSX
-bash: ./noddy_precompiled_MacOSX: Permission denied
Macintosh-5:pynoddy matteoniccoli$

I get again a permission error.

flohorovicic commented 7 years ago

Great to see that you are interested in our project and I hope that I can help you getting started quickly! I am also running pynoddy on MacOSX, so there should be no problem!

I just tested the compile script on two different (MacOSX)-system and the procedure works as you tried (first running bash adjust_for_MACOSX.sh and then bash compile.sh).

Both scripts should only affect the current directory you are in. Could you check if you have write permissions in your directory (ls -ld .)? (And, if you do not have write permissions, you could add them to the directory, e.g. with chmod -R u=rwx noddy in the parent pynoddy directory)

Also, are you installing on your own machine where you have superuser-rights? Then, of course you could run the scripts as su (if you want to do that):

sudo bash adjust_for_MACOSX.sh sudo bash compile.sh

I hope that helps! Looking forward to hear how you go!

mycarta commented 7 years ago

Thank you

I did as you suggest and it seemed to work, e.g. sudo bash adjust_for_MACOSX.sh sudo bash compile.sh

HOwever, then I tried to place the executable noddy in the Path, e.g. by adding the last line to the .bash_profile:

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
export PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}
# added by Anaconda 2.1.0 installer
export PATH="//anaconda/bin:$PATH"

# added by Anaconda2 4.0.0 installer
export PATH="/Users/matteoniccoli/anaconda2/bin:$PATH"

# added by matteo for pynoddy
export PATH="/Users/matteoniccoli/Pythonwork/GitHub/pynoddy/:\$PATH"

But that really messed up with the system, so that no commands are recognized in the terminal any more, and I am forced to restore the previous version of the .bash_profile

flohorovicic commented 7 years ago

Good to hear that the installation itself worked! Did you test the executable, i.e. running it directly in the directory (noddy): $> ./noddy.exe (or $> ./noddy)?

Ok, concerning adding it to the Path: it should be: export PATH="/Users/matteoniccoli/Pythonwork/GitHub/pynoddy/:$PATH"

Note: no escape character (\) before the $.

Also as an idea: before messing with the .bash_profile file (and possibly getting in trouble with your system), try executing the command in a terminal only, and see if the path is added correctly with:

echo $PATH

You should see a list of all your directories that contain executable files - plus the one of the noddy directory.

Hope that works! And for now: all the best for the remaining hours of the year - and a great start into the new one!

mycarta commented 7 years ago

I will try that. Thank you