Skip to content
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

docs: Cython version can not be installed #64

Open
jcea opened this issue May 25, 2023 · 5 comments
Open

docs: Cython version can not be installed #64

jcea opened this issue May 25, 2023 · 5 comments
Assignees

Comments

@jcea
Copy link

jcea commented May 25, 2023

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

@lrq3000
Copy link
Collaborator

lrq3000 commented May 27, 2023

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).

@jcea
Copy link
Author

jcea commented May 28, 2023

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
>>> 

@lrq3000
Copy link
Collaborator

lrq3000 commented Jun 1, 2023

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.

@jcea
Copy link
Author

jcea commented Jun 2, 2023

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.

@lrq3000
Copy link
Collaborator

lrq3000 commented Jun 12, 2023

@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.

@lrq3000 lrq3000 changed the title Cython version can not be installed docs: Cython version can not be installed Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants