Skip to content

πŸ› οΈ Megspikes Installation Fix (macOS + Python 3.7)Β #75

Description

@xenificity

πŸ› οΈ megspikes Installation Fix (macOS + Python 3.7)

Problem

pip install megspikes fails with this error on macOS when using the recommended Python 3.7 conda environment:

OSError: [Errno 66] Directory not empty: .../Cython-3.0.12-....egg/...dist-info β†’ .../EGG-INFO
FileExistsError during setup.py clean

Root cause: setup.py adds 'Cython' to setup_requires. This pulls Cython β‰₯ 3.0, which has a known macOS + legacy setuptools bug when building eggs in temporary directories.


βœ… Working Solution

Run these two commands in your (megspikes) environment:

pip install "cython>=0.29,<3.0" numpy==1.21.0
pip install megspikes --no-cache-dir

This pre-installs a compatible older Cython version and avoids the conflicting build step.


Alternative: Fresh Environment (Recommended)

conda deactivate
conda env remove -n megspikes

conda create -n megspikes python=3.7 pip
conda activate megspikes

pip install --upgrade pip setuptools wheel
pip install "cython>=0.29,<3.0"
pip install megspikes --no-cache-dir

Notes

  • The package pins very old dependencies (numpy 1.21, mne 0.23, etc.). This is expected for reproducibility.
  • Python 3.7 is EOL β€” consider updating workflows if possible in the future.
  • After installation, verify with:
    python -c "import megspikes; print(megspikes.__version__)"

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