Closed Franky1 closed 1 year ago
I am using WinPython distributions for all of my windows machines:
https://winpython.github.io/
I suspect something is broken with this particular WinPython version.
I just tried it on another computer with (Win)Python 3.7.7, there pip install --upgrade reedsolo
worked without errors.
I will have another look at the other machine with (Win)Python 3.8.6. and report back.
Still after switching from WinPython 3.8.6.0
to WinPython 3.8.8.0
on this machine, i had no success to install reedsolo
.
Only after installing the latest Microsoft Visual C++ 14.2 Build Tools on this machine I was able to install reedsolo
without any error messages.
https://wiki.python.org/moin/WindowsCompilers
I think that issue can be closed with this.
I still wondered why a ready-made wheel is not taken instead. Could it be because only one wheel is provided for Python 3.7?
Only after installing the latest Microsoft Visual C++ 14.2 Build Tools on this machine I was able to install
reedsolo
without any error messages.https://wiki.python.org/moin/WindowsCompilers
I think that issue can be closed with this.
The problem with this solution is it requires installing a 6.8GB build tool. Pip should provide a compiled binary avoiding the need for it.
edit: found a solution: pip install reedsolo --no-binary={reedsolo}
To answer both of your questions, I GUESS (but I'm not sure) that you both had Cython installed but without a C compiler compatible with your Python version. So reedsolo tried to compile on pip install but failed miserably.
But note that there IS a compiled binary in the wheel, that's why I went through the hassle of configuring a quite complex setup.py to manage different cases. But Python is NOT a language made for compilation, so this kind of use case is a bit off limits, and errors like this can happen. Maybe now with pip3 it works better, fairly complex tools are now installable with pip instead of requiring precompiled binaries through conda or other recipe forges, but I don't have the time to rework everything.
I have merged some proposed changes to fix this issue hopefully. Please let me know if it now works (I know it's quite late, but it's all pro-bono voluntary work here, and it's not even my specialty field).
Please re-open this thread if necessary. Thank you for your patience.
I still have problems... What can I do? I have Python 3.11. Windows.
@lia800 Thank you for reporting this issue. Could you please try to install the development release of reedsolo
like this:
pip install --upgrade git+https://github.com/tomerfiliba/reedsolomon
And please let me know if it works now? I have just pushed some changes that should hopefully fix the issue once and for all (ie, only the pure-python implementation should be installed by default now, the cythonized implementation requires an explicit switch, it's not compiled automatically anymore).
Thank you very much [lrq3000], but I realized that I needed to download Microsoft C++ Build Tools and that works.
Ok glad it works for you now! But anyway now you won't need the C++ compiler anymore unless you want to use the cythonized implementation, this will make things simpler moving forward.
18 janv. 2023 16:01:49 lia800 @.***>:
Thank you very much [lrq3000], but I realized that I needed to download Microsoft C++ Build Tools and that works.
— Reply to this email directly, view it on GitHub[https://github.com/tomerfiliba/reedsolomon/issues/32#issuecomment-1387213355], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAIRFXR74SSOCP7RE5LYNILWTAAVXANCNFSM4ZRSVROA]. You are receiving this because you were assigned.[Image de pistage][https://github.com/notifications/beacon/AAIRFXTZ7PUI7NYUWD5DFTLWTAAVXA5CNFSM4ZRSVROKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKKXTEKY.gif]
For future reference, here is a post-mortem of this issue: the main issue is that I tried to provide a compiled creedsolo (cythonized extension) in the wheel build for Windows users, the assumption was that Linux users either did not have Cython installed, or they had Cython + GCC, as it's highly unlikely Linux users would not have GCC installed.
However, there were two pitfalls:
The proper way to build wheels with cythonized extensions is in fact to compile one wheel build for each Python release we support and for each platform (Linux, MacOS and Windows), that's a lot! And also for each architecture (eg, arm64 would need another set of wheels).
In practice, the technology did not exist when we started offering a cythonized extension in this project. Nowadays, there are experimental solutions, such as cibuildwheel and multibuild, both leveraging manylinux, with which I am not familiar but appears to be a containerized implementation of linux. Also, we could probably drop our current custom implementation of setup.py arguments to make cythonization optional, by using cython-setuptools instead.
Given how complex and experimental these solutions are at the moment, although very promising, I think it's more reasonable and more future proof to simply make the cythonized extension explicitly optional: by default, only the pure python version is implemented, but the cython source code is available and can be compiled at anytime, either at install time via pip install reedsolo --install-option="--cythonize"
, or locally with python setup.py install --cythonize
.
For future reference, here are some additional pertinent resources:
Unexpected behaviour
pip install reedsolo
fails with:
Expected behaviour
pip installation should run without need to install massive ms toolchain. Provide wheels?