gevero / py_gmm

A Generalized Multiparticle Mie code, especially suited for plasmonics
GNU General Public License v3.0
22 stars 12 forks source link

f2py3 not found (on an old python install) #3

Closed jmtayloruk closed 8 years ago

jmtayloruk commented 8 years ago

As you requested, I'm opening an issue to leave a record of the conversation we had by email.

I originally wrote:

I believe I have everything necessary installed on my system, except that I already have a Python install which is not Anaconda - but I am reluctant to install that over my existing setup, as you can imagine! The problem I am encountering is that when I run “sh f2py.sh” the tool “f2py3” is not being found. I have verified that I have the f2py module in python and can “import numpy.f2py”, but it seems that the standalone tool is not installed on my system. Would you happen to know how I could install just the standalone tool to supplement my current setup?

You replied:

• You may not like this, but I strongly advise you to install anaconda. All the software is installed in a single folder and does not install above, or interferes in any way, with your current setup. The only modification to your system is the fact that the anaconda/bin folder is prepended to your PATH environment variable, so that you use anaconda by defaults. If you want to totally remove it, just remove that single folder and restore PATH to its original state, and its done. I advise you to sue anaconda for two reasons: (i) anaconda is very stable, up to date, and identical from platform to platform; (ii) in the fortran compilation step I link to anaconda openblas library: this means that if you do not have anaconda you have to modify the f2py.sh file and change the blas and lapack linking

• If you still want to use your setup, you may just need to change f2py3 (f2py for python 3 in anaconda) to f2py and you should be ok, since f2py (the python fortran wrapper) comes with numpy. Anyway, as stated above, you shall need to link to different blas and lapack libraries.

• Other than that you just need the jupyter notebook and you should be OK

Outcome:

I initially tried your suggestion of altering the f2py3 command to f2py, but on my setup at least, that did not completely work. I was not able to successfully import the py_gmm module that was built, due to missing symbols. I imagined that could be due to having something obsolete in my python install.

So I went ahead and followed your advice to install anaconda, and now all works!

gevero commented 8 years ago

Happy that it works under os X too! It's good to know!!!