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
Installation fails in current MSYS2 #8362
Comments
I believe we gave up on mingw64 and I don't know what the current status is. You might look at the http://mingwpy.github.io/ fork. @matthew-brett Comment? |
@Uni- Please check if the 8362_msys2 branch in my repo works for you. (This of course conflicts with my other pull requests, so there needs to be some more cleanup, even if it does). |
@rolk Thanks for your changes, but still looking for unexistent path. It's just because A new error is: failure searching Here is the new complete error dump:
Thanks. |
@Uni-
It now attempts to build the import library, which doesn't go well either. I have added the bin/ directory and rebased it to be on top of the other patches; please try the 8362_msys2 branch again now. |
@Uni- I've merged #8454, can you check that it now works for You? |
Current master doesn't work for me either. I feel so helpless because pasting the error message is the only thing I can do for this project. Error trace is:
I installed cython via pip, MSYS2 pacman packages |
I think maybe the distutils should not use |
That makes sense. This isn't my area and I don't use windows so I cannot add much. @rgommers Thoughts? |
@Uni- |
@rolk, |
Yup, that was what I thought. The |
@rolk, If i guess right, it's here:
/mingw64 is M:\mingw64 in my case. |
@Uni- And am I correct in reckoning that |
@rolk That's right. MSYS2 consists three subsystem; one is |
@Uni- After some thought, here is one thing I want you to test: Instead of trying to find a suitable library, we can assume that if Python is compiled from scratch, then the library/extension will be compiled with the same compiler, and that it will know how to include the right runtime library without further ado. The code is in my 8362b branch, or you can monkey-patch your Numpy with the commit itself. |
I have a new error message. @rolk can you have a read?
|
This is like in one of the old Indiana Jones movies, where when the hero has passed one trap, he just finds out that there are more traps! It seems at first glance that it doesn't find your Fortran compiler, but instead wants to try to use the Intel compiler. Can you run
I am a little confused, though. The signature of the MSVCCompiler.initialize method in the distutils.msvccompiler module has taken no extra arguments since forever: https://github.com/python/cpython/blob/master/Lib/distutils/msvccompiler.py#L248 The MSVCCompiler.initialize method in the distutils.msvc9compiler compiler module however, take a plat_name argument. Could it be that testing always pick this variant? (except when run under MSYS!) Paging @dzagorny for input. |
I have gfortran here and it works well. @rolk, with the new It's weird. As you saw, both numpy/distutils/msvccompiler.py and numpy/distutils/msvc9compiler.py use distutils.msvccompiler.MSVCCompiler (imported as _MSVCCompiler) and its method initialize(). with wrong number of arguments! How could it be built for Windows -- even with Cygwin as documented? http://www.scipy.org/scipylib/building/windows.html Reminder: MSYS2 is a recent fork of Cygwin. + It still tries to use cl instead of gcc. |
@Uni- It may be that the setup picks up a |
@rolk 8362c made this error trace:
df was in /usr/bin, but changing /usr/bin/df to /usr/bin/df1 did not make any useful changes. |
@Uni- This is due to insufficient checking for non-MSVC runtime. This is patched in 48e3e95 in updated branch https://github.com/rolk/numpy/tree/8362c. (Sorry for the slow progress, but I have no way to test what happens next). |
Whoa! I think we finally got the build successfully!
The slow progress was all my fault; I should have tested your patches more uprightly. Anyway, it was successful and thank you very much! |
|
@Uni- Looks good then? I will wrap up all the changes we did and post them as patch requests. Thank you for your persistence; too many people give up on first hurdle, which is why progress with MSYS is so slow I guess. |
It looks good and works fine as I test some matrix multi and inv codes 👍 |
I have created pull request #8675 that contains the remaining fixes from this issue. When this is merged, you should be able to build the master branch without any further patches. @Uni- In summary: Does this mean that Numpy can now be installed in MSYS2 with simply |
Looks like it's all resolved with gh-8675, thanks all! |
What is the workaround to install numpy on MSYS2? I installed the packages outlined by @rolk , but I still see these errors:
|
This issue is closed. If you want to pursue building numpy with mingw64 (probably a difficult task), please open a new one. Describe exactly what you installed, and the error message you got. You may have some luck by setting CC to your compiler path. |
I am using MSYS2 in Windows 10. With MINGW64 shell, Python and pip is available as MSYS2 packages
mingw-w64-x86_64-python3
(Python 3.5.2),mingw-w64-x86_64-python3-pip
(pip 8.1.2 / manually upgraded to pip 9.0.1) and dependencies installed.When I try to install numpy via pip, it ends with a failure stack trace ending
saying python35.dll should be found in some location. The DLL filename spec is designated in some places:
numpy/distutils/mingw32ccompiler.py:240:
numpy/distutils/mingw32ccompiler.py:428:
In MSYS2, however, Python 3.5 DLL follows
libpython<version>m.dll
.The code snippets requiring
python<version>.dll
is 8~11 years old (known from git blame) and still alive.Maybe I can write a patch for this, but I don't know any specific DLL path for MinGW, MSYS or Anaconda installation. As I know, previous MinGW/MSYS environment requires Python to be installed separately by the official installer, instead of being installed via pacman. I am slightly afraid that my patch can break any compatibility. Also, I don't know the overall structure of NumPy distutils functionality. What is the appropriate thing I can do? If possible, where is the point I can write a patch on?
The text was updated successfully, but these errors were encountered: