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

Compatibility issue when building with python=3.12 #52

Open
Liwen-A opened this issue Aug 20, 2024 · 1 comment
Open

Compatibility issue when building with python=3.12 #52

Liwen-A opened this issue Aug 20, 2024 · 1 comment

Comments

@Liwen-A
Copy link

Liwen-A commented Aug 20, 2024

When I tried to build the project on an EC2 instance with intel icelake x86, ubuntu 24.04, I encountered the following error when running python setup.py install

Installed /usr/local/lib/python3.12/dist-packages/pycryptodomex-3.19.1-py3.12-linux-x86_64.egg
Searching for numpy<=1.23.2,>=1.23.1
Reading https://pypi.org/simple/numpy/
Downloading https://files.pythonhosted.org/packages/f4/66/17b8e95770478436bf968353c89683ce6f9e14d92e0d4fb3111c09ba18d2/numpy-1.23.2.tar.gz#sha256=b78d00e48261fbbd04aa0d7427cf78d18401ee0abd89c7559bbf422e5b1c7d01
Best match: numpy 1.23.2
Processing numpy-1.23.2.tar.gz
Writing /tmp/easy_install-t2drbrcl/numpy-1.23.2/setup.cfg
Running numpy-1.23.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-t2drbrcl/numpy-1.23.2/egg-dist-tmp-7244l8z4
/tmp/easy_install-t2drbrcl/numpy-1.23.2/setup.py:71: RuntimeWarning: NumPy 1.23.2 may not yet support Python 3.12.
  warnings.warn(
Running from numpy source directory.
/tmp/easy_install-t2drbrcl/numpy-1.23.2/setup.py:86: DeprecationWarning:

  `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
  of the deprecation of `distutils` itself. It will be removed for
  Python >= 3.12. For older Python versions it will remain present.
  It is recommended to use `setuptools < 60.0` for those Python versions.
  For more details, see:
    https://numpy.org/devdocs/reference/distutils_status_migration.html


  import numpy.distutils.command.sdist
error: Cython needs to be installed in Python as a module

I was able to solve the problem by specifying the following version for numpy and pmgy2 in setup.py:

numpy ≥ 1.26.1
gmpy2==2.2.0a1
@fangxiaoran
Copy link
Contributor

Thank you, @Liwen-A ! The compatibility issue arises because we are attempting to support Python 3.8 and above. However, it appears Python 3.12 requires additional support. We will work on fixing this issue. Thank you for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants