Skip to content

Regarding installation of proposal #403

Open

Description

@WritasreeMaitra

I am using 'pip install proposal' to install it. The installation is not showing any error. I have installed proposal-7.6.2. But when I am trying to import it, it is giving error. In jupyter notebook, the kernel is getting dead. In terminal, it's showing 'zsh: segmentation fault python'. Can you please direct me what I am doing wrong in the installation process?

Thanks,
Writasree

Activity

  1. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    Could you please run and show the output of

    $ pip uninstall proposal
    $ pip install -vv proposal
    

    And also provide details about your operating system and python installation?

  2. WritasreeMaitra commented on Oct 22, 2025

    @WritasreeMaitra
    Author

    This is the output I got-

    Using pip 25.2 from /Users/writasree/anaconda3/lib/python3.11/site-packages/pip (python 3.11)
    Non-user install because site-packages writeable
    Created temporary directory: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-build-tracker-4fbi5wt3
    Initialized build tracking at /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-build-tracker-4fbi5wt3
    Created build tracker: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-build-tracker-4fbi5wt3
    Entered build tracker: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-build-tracker-4fbi5wt3
    Created temporary directory: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-install-6b4e17id
    Created temporary directory: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-ephem-wheel-cache-pm1eor6o
    1 location(s) to search for versions of proposal:
    * https://pypi.org/simple/proposal/
    Fetching project page and analyzing links: https://pypi.org/simple/proposal/
    Getting page https://pypi.org/simple/proposal/
    Found index url https://pypi.org/simple/
    Looking up "https://pypi.org/simple/proposal/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    https://pypi.org:443 "GET /simple/proposal/ HTTP/1.1" 304 0
    Fetched page https://pypi.org/simple/proposal/ as application/vnd.pypi.simple.v1+json
      Found link https://files.pythonhosted.org/packages/ad/ae/4b8f7cb90df04a6e2e605187f1bbd990005bb8dd70b4f925e938b61a35ec/proposal-6.1.0.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.0
      Found link https://files.pythonhosted.org/packages/6e/c4/eb003e318caab8d8b5d8f9f29e5c28fffbcf0fdf3e401326c39b01b7df7a/proposal-6.1.1.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.1
      Found link https://files.pythonhosted.org/packages/e7/ed/0ae173fffe5ea30004e185a92d0801d8c413072d03d3f6983658be4f7062/proposal-6.1.2.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.2
      Found link https://files.pythonhosted.org/packages/f1/1e/4fdc7b0ecbadf441f149962011a0c50f33d7f9645113ad64de91d38dc124/proposal-6.1.3.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.3
      Found link https://files.pythonhosted.org/packages/bf/f7/77902b3b91ca525c87739c605c9dd8881fb210237b7227d66d12380fcfe2/proposal-6.1.4.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.4
      Found link https://files.pythonhosted.org/packages/11/db/e93db4653da3f5863288addb512e4a830fe39e6c18b5d673ac2376fe1001/proposal-6.1.5.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.5
      Found link https://files.pythonhosted.org/packages/64/a6/5e05aa3356e89a1873f52a13505a8cc7b1de822f832047faff31fe3093bc/proposal-6.1.6.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.6
      Found link https://files.pythonhosted.org/packages/64/f8/9375c8dcaf88b0d22012196a23366d421bf3b24c7f30f01db0df0fa6c07b/proposal-6.1.7.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.7
      Found link https://files.pythonhosted.org/packages/db/ae/4b498c2d6bb81ff65614d94fbd4ccea307d480d779998cc2fdca29e325fd/proposal-6.1.8.tar.gz (from https://pypi.org/simple/proposal/), version: 6.1.8
      Found link https://files.pythonhosted.org/packages/0c/d8/a16fa724f894adf8280e34db0d1e4a12d64d8f6b8705542c009d09078501/proposal-7.0.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.1
      Found link https://files.pythonhosted.org/packages/29/93/9b14917d517962a9f77790efaf09da8bb61e131b6851be8349d2088564dc/proposal-7.0.3.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.3
      Found link https://files.pythonhosted.org/packages/a4/fc/02d64d419e1e958aa3d828755e1829ad97b34c8c8c39bd46756c647c208b/proposal-7.0.4.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.4
      Found link https://files.pythonhosted.org/packages/65/01/408f9b1861a4efe7f133e2697b05f009d25fbf9ce645dbfd5d424ccb0cf8/proposal-7.0.5.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.5
      Found link https://files.pythonhosted.org/packages/85/88/3749d1d45fb25d73e13f161e58b4cb03d6289cb1dcf362bf4e26bc0ed2c7/proposal-7.0.6.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.6
      Found link https://files.pythonhosted.org/packages/34/bb/9a23c61db9145c261ee0ea018a5061096188a0498f8dc3d9b06ed556ec63/proposal-7.0.7.tar.gz (from https://pypi.org/simple/proposal/), version: 7.0.7
      Found link https://files.pythonhosted.org/packages/42/e0/769e9e2e6a678aface36b4b84e81d3cd984d5759aa03b0c09e69c14adc59/proposal-7.1.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.1.0
      Found link https://files.pythonhosted.org/packages/69/55/7f9481a0243b525577daf8e1e120d2811e5cc8ffdbff43816a08c1c476f2/proposal-7.1.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.1.1
      Found link https://files.pythonhosted.org/packages/ee/8c/6ec809cc8745e5f4a71a1638411bf5566fb5247372ae5ce97c841e9aaddb/proposal-7.2.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.2.0
      Found link https://files.pythonhosted.org/packages/02/6e/aae132343214977754d9c14580f9bb4a4fcaac1527b9dadc31e9f032d702/proposal-7.2.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.2.1
      Found link https://files.pythonhosted.org/packages/6c/04/75694b54a7586f3be9d87a7d62e70a01a8252905e149e5684a986d2fc90a/proposal-7.3.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.3.0
      Found link https://files.pythonhosted.org/packages/5d/3e/16a8514b6482e605704db11d03bfb91868ad90d1cdb0291adc0ac5082179/proposal-7.3.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.3.1
      Found link https://files.pythonhosted.org/packages/4d/a7/07d6f25f8422dff763a7f92e773fd0c9fb07e36601eb797a6dea8aac7593/proposal-7.4.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.4.0
      Found link https://files.pythonhosted.org/packages/77/f2/9bb950b4ce35bd006283076fb437e40dbacb22c1abc5c30f28a5bfde3f60/proposal-7.4.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.4.1
      Found link https://files.pythonhosted.org/packages/62/04/2ccb6c329c842fae33e30ac9213660be069d77c717b0c4bcd7d811e62bf7/proposal-7.4.2.tar.gz (from https://pypi.org/simple/proposal/), version: 7.4.2
      Found link https://files.pythonhosted.org/packages/98/58/290c3e708bf2d6a893ceb6ab49f7d295df3dfb2f64fb5b68e17a4a76ef37/proposal-7.5.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.5.0
      Found link https://files.pythonhosted.org/packages/00/82/bf8772f15eea535e5c18948080114e5caf77ee6060a84615fc98d16effb5/proposal-7.5.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.5.1
      Found link https://files.pythonhosted.org/packages/c3/b8/928c6643ce3aaacf0313c7c2fc295c5c8e9ac5728d91d5361b9fbdd2e947/proposal-7.6.0.tar.gz (from https://pypi.org/simple/proposal/), version: 7.6.0
      Found link https://files.pythonhosted.org/packages/65/58/0c91344c254150c0e6d5e479360111f71aa06640b7116d347ab48cd25edc/proposal-7.6.1.tar.gz (from https://pypi.org/simple/proposal/), version: 7.6.1
      Found link https://files.pythonhosted.org/packages/4e/36/6b3ac6de2a4fac5a37d31f43a01fc0cba2e54736f616638f83c21fc94a6a/proposal-7.6.2.tar.gz (from https://pypi.org/simple/proposal/), version: 7.6.2
    Skipping link: not a file: https://pypi.org/simple/proposal/
    Given no hashes to check 29 links for project 'proposal': discarding no candidates
    Using cached wheel link: file:///Users/writasree/Library/Caches/pip/wheels/bd/01/63/2168aaa48c07c747e9c8bc9770f0355e4273fe46a6ea32d93c/proposal-7.6.2-cp311-cp311-macosx_14_0_arm64.whl
    Collecting proposal
      Using cached proposal-7.6.2-cp311-cp311-macosx_14_0_arm64.whl
    Created temporary directory: /private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-unpack-4pto_wjw
    Installing collected packages: proposal
    
    Successfully installed proposal-7.6.2
    Remote version of pip: 25.2
    Local version of pip:  25.2
    Was pip installed by pip? True
    Removed build tracker: '/private/var/folders/r1/q3xk6pb52z34lk6g_3zqg2000000gn/T/pip-build-tracker-4fbi5wt3'
    

    I am using macOS Sonoma 14.1 and python 3.11.5

  3. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    @WritasreeMaitra Sorry, the install didn't show what I wanted to see as it was not rebuilding proposal but used the already locally cached build.

    Can you try again with:

    $ pip uninstall proposal
    $ pip install -vv --no-cache proposal
    
  4. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    I see you are on an arm64 based macos using anaconda.

    I think the reason you are seeing this crash is that you are using a x86-64 anaconda, which works on its own because of rosetta, but you now are compiling proposal natively, which doesn't work together with the x86-64 python.

    To confirm, please show the output of:

    $ python3 -c 'import platform; print(platform.machine())'
    

    if it shows x86_64, you have an anaconda using x86-64 running via rosetta, which is incompatible with the newly compiled, native extension module for proposal.

    The best solution would be to install a native arm64 python, e.g. via miniforge3:

  5. WritasreeMaitra commented on Oct 22, 2025

    @WritasreeMaitra
    Author

    The output of 'python3 -c 'import platform; print(platform.machine())' is showing arm64 actually.

  6. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    Ok, then, please, provide the full installation output with the --no-cache option

  7. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    And, just to be sure, can you also check: python3 -c 'import platform; print(platform.processor()), please?

  8. WritasreeMaitra commented on Oct 22, 2025

    @WritasreeMaitra
    Author

    The output is quite big. I saved it as a pdf and it's 681 pages long. Can you tell me what specifically you are looking for in the output? I can then search that and attach the relevant part of the output.

    The output of print(platform.processor()) is arm.

  9. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    681 pages??? Maybe try with a single -v then. You can upload a txt file here.

    pip install -v --no-cache proposal 2>&1 | tee build-log.txt
    
  10. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    Ah, because it's "compiling the world" using conan.

  11. WritasreeMaitra commented on Oct 22, 2025

    @WritasreeMaitra
    Author
  12. maxnoe commented on Oct 22, 2025

    @maxnoe
    Member

    I see nothing suspicious there. However, I ran into a similar issue when now trying to install proposal into a fresh conda environment on linux (see #404).

    Could you try if installing from the repo on this branch #405 works for you?

  13. WritasreeMaitra commented on Oct 30, 2025

    @WritasreeMaitra
    Author

    Hi Max,

    I tried installing the code from #405. I am still having the same issue. When I am trying to import, it says segmentation fault in the terminal and jupyter notebook terminal is getting dead.

  14. ParsonsRD commented on May 18, 2026

    @ParsonsRD

    Hi, I had a similar issue on mac and it did not solve my problem. I had a seemingly endless conversion with gemini to try to solve this and eventually made a very ugly hack to get it to work. Below is an AI summary of this (sorry to post AI comments but this was a pain to summarise):

    Description
    When building PROPOSAL from source inside a Conda/Miniforge environment on macOS (ARM64), running import proposal triggers an immediate segmentation fault during the create_module initialization phase (take_gil crash).

    Root Cause
    During the CMake configuration phase, the build system discovers the active Python environment's dynamic library (libpython3.x.dylib) and explicitly bakes its absolute path into the final linking command for the python binding module (pyPROPOSAL).

    Additionally, on macOS, the module is being compiled using the -dynamiclib flag instead of a loadable runtime -bundle.

    When Python attempts to import the resulting .so file, the operating system tries to double-initialize a second, independent instance of the Python runtime/GIL within the hosting process. This triggers a hardware-level memory access violation (EXC_BAD_ACCESS / SIGSEGV at take_gil).

    Crash Backtrace (via LLDB)
    Plaintext

    * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
      * frame #0: 0x00000001018d15e4 libpython3.11.dylib`take_gil + 88
        frame #1: 0x00000001019344dc libpython3.11.dylib`PyGILState_Ensure + 128
        frame #2: 0x0000000100e8b4a8 proposal.cpython-311-darwin.so`___lldb_unnamed_symbol_113468 + 64
        frame #3: 0x0000000100febb2c proposal.cpython-311-darwin.so`PyInit_proposal + 140
    

    The Broken Linker Command (Generated by CMake)
    Bash

    /usr/bin/c++ -O3 -DNDEBUG -arch arm64 -dynamiclib \
      -Wl,-headerpad_max_install_names -undefined dynamic_lookup -undefined dynamic_lookup -flto \
      -o proposal.cpython-311-darwin.so \
      -install_name @rpath/proposal.cpython-311-darwin.so \
      CMakeFiles/pyPROPOSAL.dir/detail/*.o \
      -Wl,-rpath,/path/to/conda/env/lib \
      ../PROPOSAL/libPROPOSAL.a \
      /path/to/conda/env/lib/libpython3.11.dylib \
      /path/to/conda/env/lib/libCubicInterpolation.a \
      /path/to/conda/env/lib/libboost_filesystem.dylib \
      /path/to/conda/env/lib/libboost_atomic.dylib \
      /path/to/conda/env/lib/libboost_serialization.dylib \
      /path/to/conda/env/lib/libspdlog.1.17.0.dylib \
      /path/to/conda/env/lib/libfmt.12.1.0.dylib
    
    

    The Working Linker Command (Manual Bypass Fix)
    By stripping out the physical path to libpython3.11.dylib, swapping -dynamiclib for -bundle, and relying entirely on -undefined dynamic_lookup, the module loads flawlessly:

    Bash

    /usr/bin/c++ -O3 -DNDEBUG -arch arm64 -bundle \
      -Wl,-headerpad_max_install_names -undefined dynamic_lookup -flto \
      -o proposal.cpython-311-darwin.so \
      CMakeFiles/pyPROPOSAL.dir/detail/*.o \
      -Wl,-rpath,/path/to/conda/env/lib \
      ../PROPOSAL/libPROPOSAL.a \
      /path/to/conda/env/lib/libCubicInterpolation.a \
      /path/to/conda/env/lib/libboost_filesystem.dylib \
      /path/to/conda/env/lib/libboost_atomic.dylib \
      /path/to/conda/env/lib/libboost_serialization.dylib \
      /path/to/conda/env/lib/libspdlog.1.17.0.dylib \
      /path/to/conda/env/lib/libfmt.12.1.0.dylib
    
  15. maxnoe commented on May 18, 2026

    @maxnoe
    Member

    Since this is a python-specific linker issue, I suspect this might be solved by using scikit-build-core instead of the current custom cmake integration in setup.py.

    I started this here: #389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions