Skip to content

pyprimesieve segfaults using Python 3.13 #6

@rogerl50

Description

@rogerl50

I think this is related to my 3.12->3.13 upgrade, but I'm not 100% sure.

I am running Python 3.13, installed using HomeBrew, in a venv on a Mac (M2 Air, MacOS14.5). When I upgraded from 3.12 to 3.13 (at least I think this is what caused the issue), pyprimesieve now segfaults in the primesieve code.

    python
    Python 3.13.0 (main, Oct  7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from pyprimesieve import primes
    >>> primes(14)
    [2, 3, 5, 7, 11, 13]
    >>> primes(20)
    zsh: segmentation fault  python

I am using pyprimesieve 0.1.6, and the two relevant entries in the site-packages in my venv are

    pyprimesieve-0.1.6.dist-info/
    pyprimesieve.cpython-313-darwin.so*

I'm not sure what other information is relevant, but here is my pyvenv.cfg file:

    home = /opt/homebrew/opt/python@3.13/bin
    include-system-site-packages = false
    version = 3.13.0
    executable = /opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/bin/python3.13
    command = /opt/homebrew/opt/python@3.13/bin/python3.13 -m venv /Users/rlipsett/Dropbox/Math/EulerProject/.venv

Any help would be very welcome. I can of course send you the MacOS stack dump if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions