-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: gcc or gfortran may be required before the installation #80
Comments
Yes, this is true. Because the core code is Fortran, you need a fortran compiler installed. I checked the docs and you're right that this isn't listed in the instructions where it should be. |
Here are the steps that worked for me to install apexpy using a conda environment and MacOS High Sierra. It wasn't entirely straight forward, so I wanted to record it in case it helps someone else.
If you've recently tried and failed to install apexpy in this environment, you may also need the no cache option:
This is NOT an apexpy specific issue - it's just somewhat convoluted to get functioning compilers installed in a conda environment on MacOS now. I actually had a bunch of fortran-wrapped-python packages that weren't working until I got this figured out. Also, small disclaimer, this really isn't my area of expertise and there may be a better way to do this, but I wanted to share in case anyone else was having issues with the same configuration. |
windows 10 ,Unable to import fortranepex module |
Can you help me? |
I'm not sure about Windows 10, sorry. Perhaps #65 is helpful? |
I also recently had trouble on Windows 10, and wasn't able to solve the issue. Generally, if fortranapex isn't building it's because there's a mismatch between the python set up and the fortran compiler. If you can supply your full set-up details (which python you're using, which fortran compiler you're using, verifying that both are on your path, anything else that may be important), that might be helpful. The solution we ended up going with was a linux dual-boot, but that's not ideal. |
More specifically, this comment: #65 (comment) Following that does work on windows 10. I'm typing this comment from my windows 10 desktop with apexpy installed and working on it. |
Windows 10, anacond, python 3.6. I have installed gfortran on my computer. I have done so. Create a distutils.cfg file. But there are still problems. Fortranepex module cannot import
…------------------ 原始邮件 ------------------
发件人: "aburrell/apexpy" ***@***.***>;
发送时间: 2021年11月2日(星期二) 晚上11:55
***@***.***>;
***@***.******@***.***>;
主题: Re: [aburrell/apexpy] BUG: gcc or gfortran may be required before the installation (#80)
More specifically, this comment in 65: #65 (comment)
Following that does work on windows 10. I'm typing this comment from my windows 10 desktop with apexpy installed and working on it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
@hlmxlj2018, Did you install mingw as it says here: https://wiki.python.org/moin/WindowsCompilers#GCC_-_MinGW-w64_.28x86.2C_x64.29? Don't forget to add it to the PATH variable: "Add C:\MinGW_w64\bin to the PATH environment variable." Or whereever the mingw/bin directory is on your computer. |
I have do it
…------------------ 原始邮件 ------------------
发件人: "aburrell/apexpy" ***@***.***>;
发送时间: 2021年11月3日(星期三) 凌晨0:06
***@***.***>;
***@***.******@***.***>;
主题: Re: [aburrell/apexpy] BUG: gcc or gfortran may be required before the installation (#80)
@hlmxlj2018, Did you install mingw as it says here: https://wiki.python.org/moin/WindowsCompilers#GCC_-_MinGW-w64_.28x86.2C_x64.29?
Don't forget to add it to the PATH variable: "Add C:\MinGW_w64\bin to the PATH environment variable." Or whereever the mingw/bin directory is on your computer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
What version of anaconda? |
anaconda3
…------------------ 原始邮件 ------------------
发件人: "aburrell/apexpy" ***@***.***>;
发送时间: 2021年11月3日(星期三) 凌晨0:08
***@***.***>;
***@***.******@***.***>;
主题: Re: [aburrell/apexpy] BUG: gcc or gfortran may be required before the installation (#80)
What version of anaconda? conda --version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
from . import fortranapex as fa
ImportError: DLL load failed:
…------------------ 原始邮件 ------------------ from . import fortranapex as fa
ImportError: DLL load failed:
发件人: "aburrell/apexpy" ***@***.***>;
发送时间: 2021年11月3日(星期三) 凌晨0:08
***@***.***>;
***@***.******@***.***>;
主题: Re: [aburrell/apexpy] BUG: gcc or gfortran may be required before the installation (#80)
What version of anaconda? conda --version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Hm, yeah, that definitely sounds like the kind of issue that comes up when python and your fortran compilers aren't integrated nicely. I don't think I'll be very helpful with this one, sorry, but this thread might give you a few ideas. |
I just tried this when migrating our CI to GitHub Actions from Appveyor. To get the necessary environment in Windows for Numpy to work correctly, I also needed to install scipy. Here's where I was able to figure out why: https://stackoverflow.com/questions/28190534/windows-scipy-install-no-lapack-blas-resources-found This command assumes you're compiling the source instead of getting it from pip, but if you replace the setup.py command with the pip command it should work.
|
Added many of these comments to the documentation. |
Describe the bug
I cannot install the package until I install the gcc or gfortran compilers. Test env: anaconda virtual env. Python: 3.8.
The text was updated successfully, but these errors were encountered: