π οΈ 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__)"
π οΈ megspikes Installation Fix (macOS + Python 3.7)
Problem
pip install megspikesfails with this error on macOS when using the recommended Python 3.7 conda environment:Root cause:
setup.pyadds'Cython'tosetup_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-dirThis 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-dirNotes
python -c "import megspikes; print(megspikes.__version__)"