I want to complie a fortran file on Win10, just like
python3 -m numpy.f2py -c -m h3plus h3plus.f90
But python in MSYS2 doesn't contain NumPy, so I try to use conda, but I don't know how to use conda on MSYS2.
If you don't have anaconda/miniconda already installed on your windows machine, do that by downloading the proper windows installer.
If conda is already installed on the windows side, all you have to do is initialize conda for MSYS2's bash. To do this, edit .bash_profile and append something like the following:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
eval "$('/c/Users/John/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
# <<< conda initialize <<<
Make sure you replace the path on the 3rd line with the path to conda.exe on your machine. After that close and reopen your MSYS2 terminals.
If you're using a shell other than bash, you can inspect the output of conda init --all --dry-run --verbose in order to find the corresponding init script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With