reedsolomon
reedsolomon copied to clipboard
docs: Cython version can not be installed
I follow the steps described in the read me to install the cython version, with no luck. Specifically:
jcea@jcea:/tmp/ram$ pip install --upgrade reedsolo --install-option="--cythonize" --verbose
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --install-option
Python 3.11.3 pip 23.1.2 cython 0.29.34
Ah sorry the instructions on pypi are outdated, but the ones in the github repo readme are correct. With the latest pip version as you are using, you need to use the following command:
# To compile from the latest stable release:
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --isolated --verbose
Please try and let me know if this fixes your issue.
In the future, you will not need do compile the binary yourself as it will be done automatically via cibuildwheel (I'm waiting for Cython v3 to release - but you can already try by using pip installing reedsolo with the --pre
flag).
No, this doesn't solve the issue. It installs fine, but the Cython module is not installed.
After following your instructions, I see this:
jcea@jcea:~$ python3
Python 3.11.3 (main, Apr 11 2023, 01:44:07) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import creedsolo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'creedsolo'
>>> import reedsolo
>>>
Ok I figured it out @jcea , the issue is that since we do not use PEP517/518 in reedsolo < v2, cython is not a build requirement, so it must be installed manually beforehand (by you), and then you also need to force pip to NOT use build isolation, with the following command:
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --no-build-isolation --verbose
Please note that this issue arises only because you are trying to use the old reedsolo that is not made to work with modern python packaging but v2/early v3 setup.py based style.
If you can accept using Cython v3 beta, I would strongly recommend to instead use the reedsolo v2 branch:
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --pre --verbose
If you want to compile by yourself.
Or if you can accept to use a pre-compiled creedsolo binary, you can simply use:
pip install reedsolo --pre
Please let me know if this solves your issue! In the future when Cython v3 stable will be out, this whole issue will be resolved on its own, I’ll keep it open until then for information.
Ok I figured it out @jcea , the issue is that since we do not use PEP517/518 in reedsolo < v2, cython is not a build requirement, so it must be installed manually beforehand (by you), and then you also need to force pip to NOT use build isolation, with the following command:
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --no-build-isolation --verbose
Please note that this issue arises only because you are trying to use the old reedsolo that is not made to work with modern python packaging but v2/early v3 setup.py based style.
If you can accept using Cython v3 beta, I would strongly recommend to instead use the reedsolo v2 branch:
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --pre --verbose
If you want to compile by yourself.
Or if you can accept to use a pre-compiled creedsolo binary, you can simply use:
pip install reedsolo --pre
Please let me know if this solves your issue! In the future when Cython v3 stable will be out, this whole issue will be resolved on its own, I’ll keep it open until then for information.
Your first command pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --no-build-isolation --verbose
worked fine. Thanks!.
I was just following the instructions in your documentation. If those instructions require preconditions, they should be clearly stated. I would amend documentation with the details contained in this issue.
Thanks for investing time on this. Much appreciated.
@jcea Ill provide more guidance in the docs, thank you for your suggestion. I am experiencing technical difficulties at the moment so I cannot do it right now, but I will fix it in the upcoming weeks.