cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
304 stars 155 forks source link

installation issues on macos ventura #1236

Closed alemessurier closed 7 months ago

alemessurier commented 7 months ago

Hi, I've tried installing phy2 several ways on my macbook pro (running ventura) but I've run into multiple issues.

When I install using the instructions from the read me I get the issue described here: https://github.com/cortex-lab/phy/issues/1231

I then cloned the whole repository and made the environment from the .yml file and I get the openGL error described in that ^ issue, though I'm doing this locally, not on a cluster.

I next tried just downloading the environment.yml file, making a new conda environment from the .yml, and running phy and I get this error, which seems to be due to phy2 being incompatible with python 3.12 (so maybe the environment.yml needs to be updated?):

conda env create -f environment.yml
conda activate phy2
phy template-gui ./params.py --debug
Traceback (most recent call last):
  File "/Users/aml717/opt/anaconda3/envs/phy2/bin/phy", line 5, in <module>
    from phy.apps import phycli
  File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.12/site-packages/phy/__init__.py", line 21, in <module>
    from .utils.config import load_master_config
  File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.12/site-packages/phy/utils/__init__.py", line 8, in <module>
    from .plugin import IPlugin, attach_plugins
  File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.12/site-packages/phy/utils/plugin.py", line 14, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

here is the environment at this point:

`conda list

packages in environment at /Users/aml717/opt/anaconda3/envs/phy2:

#

Name Version Build Channel

appnope 0.1.3 pyhd8ed1ab_0 conda-forge asttokens 2.4.1 pyhd8ed1ab_0 conda-forge aws-c-auth 0.7.7 hc3630cc_0 conda-forge aws-c-cal 0.6.9 h49e9720_1 conda-forge aws-c-common 0.9.8 h10d778d_0 conda-forge aws-c-compression 0.2.17 hff1f2c8_6 conda-forge aws-c-event-stream 0.3.2 hb6e475e_6 conda-forge aws-c-http 0.7.14 h950a07a_1 conda-forge aws-c-io 0.13.35 hb98174f_8 conda-forge aws-c-mqtt 0.9.9 h5e4a26e_0 conda-forge aws-c-s3 0.3.24 h4293da7_1 conda-forge aws-c-sdkutils 0.1.12 hff1f2c8_5 conda-forge aws-checksums 0.1.17 hff1f2c8_5 conda-forge aws-crt-cpp 0.24.7 h0a75192_2 conda-forge aws-sdk-cpp 1.11.182 h28d282b_7 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge bokeh 3.3.1 pyhd8ed1ab_0 conda-forge brotli 1.1.0 pypi_0 pypi brotli-bin 1.1.0 h0dc2134_1 conda-forge brotli-python 1.1.0 py312heafc425_1 conda-forge bzip2 1.0.8 h10d778d_5 conda-forge c-ares 1.22.1 h10d778d_0 conda-forge ca-certificates 2023.11.17 h8857fd0_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge certifi 2023.11.17 pyhd8ed1ab_0 conda-forge charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge click 8.1.7 unix_pyh707e725_0 conda-forge cloudpickle 3.0.0 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge colorcet 3.0.1 pypi_0 pypi comm 0.1.4 pyhd8ed1ab_0 conda-forge contourpy 1.2.0 pypi_0 pypi curl 8.4.0 h726d00d_0 conda-forge cycler 0.12.1 pyhd8ed1ab_0 conda-forge cython 3.0.5 pypi_0 pypi cytoolz 0.12.2 pypi_0 pypi dask 2023.11.0 pyhd8ed1ab_0 conda-forge dask-core 2023.11.0 pyhd8ed1ab_0 conda-forge debugpy 1.8.0 pypi_0 pypi decorator 5.1.1 pyhd8ed1ab_0 conda-forge distributed 2023.11.0 pyhd8ed1ab_0 conda-forge exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge executing 2.0.1 pyhd8ed1ab_0 conda-forge fonttools 4.45.0 pypi_0 pypi freetype 2.12.1 h60636b9_2 conda-forge fsspec 2023.10.0 pyhca7485f_0 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge gflags 2.2.2 hb1e8313_1004 conda-forge ghp-import 2.1.0 pypi_0 pypi giflib 5.2.1 hb7f2c08_3 conda-forge git 2.42.0 pl5321hbb4c4ee_0 conda-forge glib 2.78.1 hf4d7fad_0 conda-forge glib-tools 2.78.1 hf4d7fad_0 conda-forge glog 0.6.0 h8ac2a54_0 conda-forge gst-plugins-base 1.22.7 hd283e88_0 conda-forge gstreamer 1.22.7 h8954545_0 conda-forge h5py 3.10.0 pypi_0 pypi hdf5 1.14.2 nompi_hedada53_100 conda-forge icu 73.2 hf5e326d_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipykernel 6.26.0 pyh3cd1d5f_0 conda-forge ipython 8.17.2 pyh31c8845_0 conda-forge jedi 0.19.1 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.3.2 pyhd8ed1ab_0 conda-forge jupyter-core 5.5.0 pypi_0 pypi jupyter_client 8.6.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.5.0 py312hb401068_0 conda-forge kiwisolver 1.4.5 pypi_0 pypi krb5 1.21.2 hb884880_0 conda-forge lcms2 2.15 hd6ba6f3_3 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libabseil 20230802.1 cxx17_h048a20a_0 conda-forge libaec 1.1.2 he965462_1 conda-forge libarrow 14.0.1 hd201b0c_3_cpu conda-forge libarrow-acero 14.0.1 hc222712_3_cpu conda-forge libarrow-dataset 14.0.1 hc222712_3_cpu conda-forge libarrow-flight 14.0.1 h440f1c2_3_cpu conda-forge libarrow-flight-sql 14.0.1 h2cc6c1c_3_cpu conda-forge libarrow-gandiva 14.0.1 heeebe7c_3_cpu conda-forge libarrow-substrait 14.0.1 h2cc6c1c_3_cpu conda-forge libblas 3.9.0 19_osx64_openblas conda-forge libbrotlicommon 1.1.0 h0dc2134_1 conda-forge libbrotlidec 1.1.0 h0dc2134_1 conda-forge libbrotlienc 1.1.0 h0dc2134_1 conda-forge libcblas 3.9.0 19_osx64_openblas conda-forge libclang 15.0.7 default_hdb78580_3 conda-forge libclang13 15.0.7 default_h953c2e9_3 conda-forge libcrc32c 1.1.2 he49afe7_0 conda-forge libcurl 8.4.0 h726d00d_0 conda-forge libcxx 16.0.6 hd57cbcb_0 conda-forge libdeflate 1.19 ha4e1b8e_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libevent 2.1.12 ha90c15b_1 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 13_2_0_h97931a8_1 conda-forge libgfortran5 13.2.0 h2873a65_1 conda-forge libglib 2.78.1 h6d9ecee_0 conda-forge libgoogle-cloud 2.12.0 hc0857f6_4 conda-forge libgrpc 1.59.3 ha7f534c_0 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libjpeg-turbo 3.0.0 h0dc2134_1 conda-forge liblapack 3.9.0 19_osx64_openblas conda-forge libllvm15 15.0.7 he4b1e75_3 conda-forge libnghttp2 1.58.0 h64cf6d3_0 conda-forge libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.24 openmp_h48a4ad5_0 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libparquet 14.0.1 h27bd29f_3_cpu conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libpq 16.1 h6dd4ff7_0 conda-forge libprotobuf 4.24.4 h0ee05dc_0 conda-forge libre2-11 2023.06.02 h4694dbf_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsqlite 3.44.0 h92b6c6a_0 conda-forge libssh2 1.11.0 hd019ec5_0 conda-forge libthrift 0.19.0 h064b379_1 conda-forge libtiff 4.6.0 h684deea_2 conda-forge libutf8proc 2.8.0 hb7f2c08_0 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libwebp 1.3.2 h44782d1_1 conda-forge libwebp-base 1.3.2 h0dc2134_0 conda-forge libxcb 1.15 hb7f2c08_0 conda-forge libxml2 2.11.6 hc0ae0f7_0 conda-forge libzlib 1.2.13 h8a1eda9_5 conda-forge llvm-openmp 17.0.5 hb6ac08f_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lz4 4.3.2 pypi_0 pypi lz4-c 1.9.4 hf0c8a7f_0 conda-forge markdown 3.5.1 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi matplotlib 3.8.2 pypi_0 pypi matplotlib-base 3.8.2 py312h302682c_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mergedeep 1.3.4 pypi_0 pypi mkdocs 1.5.3 pypi_0 pypi msgpack 1.0.6 pypi_0 pypi msgpack-python 1.0.6 py312h49ebfd2_0 conda-forge mtscomp 1.0.2 pypi_0 pypi munkres 1.1.4 pyh9f0ad1d_0 conda-forge mysql-common 8.0.33 h1d20c9b_6 conda-forge mysql-libs 8.0.33 hed35180_6 conda-forge ncurses 6.4 h93d8f39_2 conda-forge nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge nspr 4.35 hea0b92c_0 conda-forge nss 3.94 hd6ac835_0 conda-forge numpy 1.26.0 pypi_0 pypi openjpeg 2.5.0 ha4da562_3 conda-forge openssl 3.1.4 hd75f5a5_0 conda-forge orc 1.9.0 hd1092d7_4 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge pandas 2.1.3 pypi_0 pypi param 2.0.1 pypi_0 pypi parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.4.1 pyhd8ed1ab_0 conda-forge pathspec 0.11.2 pypi_0 pypi pcre2 10.40 h1c4e4bc_0 conda-forge perl 5.32.1 4_h0dc2134_perl5 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge phy 2.0b5 pypi_0 pypi phylib 2.4.3 pypi_0 pypi pickleshare 0.7.5 py_1003 conda-forge pillow 10.1.0 pypi_0 pypi pip 23.3.1 pyhd8ed1ab_0 conda-forge platformdirs 4.0.0 pyhd8ed1ab_0 conda-forge pluggy 1.3.0 pyhd8ed1ab_0 conda-forge ply 3.11 py_1 conda-forge prompt-toolkit 3.0.41 pyha770c72_0 conda-forge prompt_toolkit 3.0.41 hd8ed1ab_0 conda-forge psutil 5.9.5 pypi_0 pypi pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pyarrow 14.0.1 pypi_0 pypi pyarrow-hotfix 0.5 pyhd8ed1ab_0 conda-forge pyct 0.5.0 pypi_0 pypi pygments 2.17.1 pyhd8ed1ab_0 conda-forge pyopengl 3.1.6 pyhd8ed1ab_1 conda-forge pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge pyqt 5.15.9 py312hd74d816_5 conda-forge pyqt5 5.15.9 pypi_0 pypi pyqt5-sip 12.12.2 pypi_0 pypi pyqtwebengine 5.15.4 pypi_0 pypi pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.3 pyhd8ed1ab_0 conda-forge python 3.12.0 h30d4d87_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.12 4_cp312 conda-forge pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge pyyaml 6.0.1 pypi_0 pypi pyyaml-env-tag 0.1 pypi_0 pypi pyzmq 25.1.1 pypi_0 pypi qt-main 5.15.8 h4385fff_17 conda-forge qt-webengine 5.15.8 h5f65913_4 conda-forge qtconsole 5.5.1 pyhd8ed1ab_0 conda-forge qtconsole-base 5.5.1 pyha770c72_0 conda-forge qtpy 2.4.1 pyhd8ed1ab_0 conda-forge re2 2023.06.02 hd34609a_0 conda-forge readline 8.2 h9e318b2_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge responses 0.24.1 pyhd8ed1ab_0 conda-forge scikit-learn 1.3.2 pypi_0 pypi scipy 1.11.3 pypi_0 pypi setuptools 68.2.2 pyhd8ed1ab_0 conda-forge sip 6.7.12 pypi_0 pypi six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge tblib 2.0.0 pyhd8ed1ab_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tk 8.6.13 h1abcd95_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.3 pypi_0 pypi tqdm 4.66.1 pypi_0 pypi traitlets 5.13.0 pyhd8ed1ab_0 conda-forge types-pyyaml 6.0.12.12 pyhd8ed1ab_0 conda-forge typing_extensions 4.8.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge urllib3 2.1.0 pyhd8ed1ab_0 conda-forge watchdog 3.0.0 pypi_0 pypi wcwidth 0.2.10 pyhd8ed1ab_0 conda-forge wheel 0.41.3 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xyzservices 2023.10.1 pyhd8ed1ab_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.5 h93d8f39_0 conda-forge zict 3.0.0 pyhd8ed1ab_0 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zstd 1.5.5 h829000d_0 conda-forge`

From there I tried downgrading to python 3.8 within the environment:

$ conda install -c anaconda python=3.8 $ phy template-gui ./params.py --debug

then got this error:


Traceback (most recent call last):
  File "/Users/aml717/opt/anaconda3/envs/phy2/bin/phy", line 5, in <module>
    from phy.apps import phycli
ModuleNotFoundError: No module named 'phy'

so I pip installed phy and tried again: $ pip install git+https://github.com/cortex-lab/phy.git $ phy template-gui ./params.py --debug

and now have the segmentation fault error again:

09:34:03.492 [D] __init__:68          Start capturing exceptions.
09:34:03.550 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
09:34:03.567 [D] model:619            Loading spike clusters.
09:34:03.595 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
09:34:03.616 [D] model:569            No channel shank file found.
09:34:03.617 [D] model:692            Loading templates.
09:34:04.378 [D] model:724            Templates are dense.
09:34:04.380 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
09:34:04.380 [D] model:730            Loading the whitening matrix.
09:34:04.384 [D] model:737            Loading the inverse of the whitening matrix.
09:34:04.418 [D] model:766            Loading features.
09:34:04.467 [D] model:781            Features are sparse.
09:34:04.468 [D] model:803            Loading template features.
09:34:04.495 [D] model:813            Template features are sparse.
09:34:05.384 [D] context:100          Initialize joblib cache dir at `/Users/aml717/data/neuropixels/3100um_calls_2023-10-26_15-59-48/.phy`.
09:34:05.386 [D] context:101          Reducing the size of the cache if needed.
09:34:05.392 [D] base:102             Add filter `high_pass`.
09:34:05.393 [D] config:31            Load config file `/Users/aml717/.phy/phy_config.py`.
09:34:05.394 [D] plugin:145           Loading 0 plugins.
09:34:05.397 [D] context:209          The file `/Users/aml717/data/neuropixels/3100um_calls_2023-10-26_15-59-48/.phy/new_cluster_id.pkl` doesn't exist.
09:34:05.470 [D] context:185          Save data to `/Users/aml717/data/neuropixels/3100um_calls_2023-10-26_15-59-48/.phy/spikes_per_cluster.pkl`.
09:34:05.551 [D] gui:463              Creating GUI.
09:34:06.544 [D] state:46             Load /Users/aml717/.phy/TemplateGUI/state.json for GUIState.
09:34:10.958 [D] gui:718              Add view ClusterView to GUI.
09:34:11.019 [D] gui:718              Add view SimilarityView to GUI.
09:34:11.077 [D] gui:718              Add view WaveformView to GUI.
09:34:11.127 [D] base:337             Set state for WaveformView.
09:34:11.143 [D] gui:718              Add view CorrelogramView to GUI.
09:34:11.146 [D] base:337             Set state for CorrelogramView.
09:34:11.171 [D] gui:718              Add view ISIView to GUI.
09:34:11.174 [D] base:337             Set state for ISIView.
09:34:11.192 [D] gui:718              Add view FeatureView to GUI.
09:34:11.195 [D] base:337             Set state for FeatureView.
09:34:11.218 [D] gui:718              Add view AmplitudeView to GUI.
09:34:11.222 [D] base:337             Set state for AmplitudeView.
09:34:11.249 [D] gui:718              Add view FiringRateView to GUI.
09:34:11.252 [D] base:337             Set state for FiringRateView.
Segmentation fault: 11

Here's my conda evironment at this point:

`# packages in environment at /Users/aml717/opt/anaconda3/envs/phy2: #

Name Version Build Channel

appnope 0.1.3 pyhd8ed1ab_0 conda-forge asttokens 2.4.1 pyhd8ed1ab_0 conda-forge aws-c-auth 0.7.7 hc3630cc_0 conda-forge aws-c-cal 0.6.9 h49e9720_1 conda-forge aws-c-common 0.9.8 h10d778d_0 conda-forge aws-c-compression 0.2.17 hff1f2c8_6 conda-forge aws-c-event-stream 0.3.2 hb6e475e_6 conda-forge aws-c-http 0.7.14 h950a07a_1 conda-forge aws-c-io 0.13.35 hb98174f_8 conda-forge aws-c-mqtt 0.9.9 h5e4a26e_0 conda-forge aws-c-s3 0.3.24 h4293da7_1 conda-forge aws-c-sdkutils 0.1.12 hff1f2c8_5 conda-forge aws-checksums 0.1.17 hff1f2c8_5 conda-forge aws-crt-cpp 0.24.7 h0a75192_2 conda-forge backcall 0.2.0 pyhd3eb1b0_0 anaconda backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge blas 1.0 openblas anaconda bokeh 2.4.3 py38hecd8cb5_0 anaconda bottleneck 1.3.5 py38h67323c0_0 anaconda brotli 1.1.0 h0dc2134_1 conda-forge brotli-bin 1.1.0 h0dc2134_1 conda-forge brotli-python 1.0.9 py38he9d5cce_7 anaconda bzip2 1.0.8 h10d778d_5 conda-forge c-ares 1.22.1 h10d778d_0 conda-forge ca-certificates 2023.08.22 hecd8cb5_0 anaconda cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge certifi 2023.11.17 py38hecd8cb5_0 anaconda charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge click 8.1.7 unix_pyh707e725_0 conda-forge cloudpickle 3.0.0 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge colorcet 3.0.1 pypi_0 pypi comm 0.1.4 pyhd8ed1ab_0 conda-forge curl 7.88.1 h04015c4_2 anaconda cycler 0.12.1 pyhd8ed1ab_0 conda-forge cyrus-sasl 2.1.28 h3973f50_1 anaconda cython 3.0.0 py38h6c40b1e_0 anaconda cytoolz 0.12.0 py38hca72f7f_0 anaconda dask 2023.4.1 py38hecd8cb5_0 anaconda dask-core 2023.4.1 py38hecd8cb5_0 anaconda debugpy 1.6.7 py38hcec6c5f_0 anaconda decorator 5.1.1 pyhd8ed1ab_0 conda-forge distributed 2023.4.1 py38hecd8cb5_0 anaconda exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge executing 2.0.1 pyhd8ed1ab_0 conda-forge expat 2.5.0 hcec6c5f_0 anaconda freetype 2.12.1 hd8bbffd_0 anaconda fsspec 2023.10.0 pyhca7485f_0 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge gflags 2.2.2 hb1e8313_1004 conda-forge ghp-import 2.1.0 pypi_0 pypi giflib 5.2.1 hb7f2c08_3 conda-forge git 2.40.1 pl5340hb824c65_1 anaconda glib 2.69.1 hfff2838_2 anaconda glog 0.6.0 h8ac2a54_0 conda-forge gst-plugins-base 1.14.1 hcec6c5f_1 anaconda gstreamer 1.14.1 h6c40b1e_1 anaconda h5py 3.9.0 py38hf9d4033_0 anaconda hdf5 1.12.1 ha01d115_3 anaconda icu 73.2 hf5e326d_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipykernel 6.26.0 pyh3cd1d5f_0 conda-forge ipython 8.12.2 py38hecd8cb5_0 anaconda jedi 0.19.1 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.3.2 pyhd8ed1ab_0 conda-forge jpeg 9e h6c40b1e_1 anaconda jupyter_client 8.6.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.5.0 py38hecd8cb5_0 anaconda kiwisolver 1.4.4 py38hcec6c5f_0 anaconda krb5 1.20.1 h428f121_1 anaconda lerc 4.0.0 hb486fe8_0 conda-forge libabseil 20230802.1 cxx17_h048a20a_0 conda-forge libaec 1.1.2 he965462_1 conda-forge libblas 3.9.0 19_osx64_openblas conda-forge libbrotlicommon 1.1.0 h0dc2134_1 conda-forge libbrotlidec 1.1.0 h0dc2134_1 conda-forge libbrotlienc 1.1.0 h0dc2134_1 conda-forge libcblas 3.9.0 19_osx64_openblas conda-forge libclang 14.0.6 default_hd95374b_1 anaconda libclang13 14.0.6 default_habbcc1a_1 anaconda libcrc32c 1.1.2 he49afe7_0 conda-forge libcurl 7.88.1 hf20ceda_2 anaconda libcxx 16.0.6 hd57cbcb_0 conda-forge libdeflate 1.19 ha4e1b8e_0 conda-forge libedit 3.1.20221030 h6c40b1e_0 anaconda libev 4.33 haf1e3a3_1 conda-forge libevent 2.1.12 ha90c15b_1 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 13_2_0_h97931a8_1 conda-forge libgfortran5 13.2.0 h2873a65_1 conda-forge libiconv 1.17 hac89ed1_0 conda-forge liblapack 3.9.0 19_osx64_openblas conda-forge libllvm14 14.0.6 h91fad77_3 anaconda libnghttp2 1.57.0 h9beae6a_0 anaconda libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.24 openmp_h48a4ad5_0 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libpng 1.6.39 h6c40b1e_0 anaconda libpq 12.15 h04015c4_1 anaconda libre2-11 2023.06.02 h4694dbf_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libssh2 1.10.0 h04015c4_2 anaconda libtiff 4.2.0 h2ef1027_2 anaconda libutf8proc 2.8.0 hb7f2c08_0 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libwebp-base 1.3.2 h0dc2134_0 conda-forge libxcb 1.15 hb7f2c08_0 conda-forge llvm-openmp 17.0.5 hb6ac08f_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lz4-c 1.9.4 hf0c8a7f_0 conda-forge markdown 3.5.1 pypi_0 pypi markupsafe 2.1.1 py38hca72f7f_0 anaconda matplotlib 3.1.2 py38h9aa3819_0 anaconda matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mergedeep 1.3.4 pypi_0 pypi mkdocs 1.5.3 pypi_0 pypi msgpack-python 1.0.3 py38haf03e11_0 anaconda mtscomp 1.0.2 pypi_0 pypi munkres 1.1.4 pyh9f0ad1d_0 conda-forge mysql 5.7.24 h1a8d504_2 anaconda mysql-common 8.0.33 h1d20c9b_6 conda-forge ncurses 6.4 h93d8f39_2 conda-forge nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge nspr 4.35 hea0b92c_0 conda-forge numexpr 2.8.4 py38h57a7bef_1 anaconda numpy 1.24.3 py38h57a7bef_0 anaconda numpy-base 1.24.3 py38hc93c6d9_0 anaconda olefile 0.46 pyhd3eb1b0_0 anaconda openssl 3.1.4 hd75f5a5_0 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge pandas 2.0.3 py38h3ea8b11_0 anaconda param 2.0.1 pypi_0 pypi parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.4.1 pyhd8ed1ab_0 conda-forge pathspec 0.11.2 pypi_0 pypi pcre 8.45 h23ab428_0 anaconda pcre2 10.42 h9b97e30_0 anaconda perl 5.32.1 4_h0dc2134_perl5 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge phy 2.0b5 pypi_0 pypi phylib 2.4.3 pypi_0 pypi pickleshare 0.7.5 py_1003 conda-forge pillow 7.1.2 py38h4655f20_0 anaconda pip 23.3.1 pyhd8ed1ab_0 conda-forge platformdirs 4.0.0 pyhd8ed1ab_0 conda-forge pluggy 1.3.0 pyhd8ed1ab_0 conda-forge ply 3.11 py_1 conda-forge pooch 1.7.0 py38hecd8cb5_0 anaconda prompt-toolkit 3.0.41 pyha770c72_0 conda-forge prompt_toolkit 3.0.41 hd8ed1ab_0 conda-forge psutil 5.9.0 py38hca72f7f_0 anaconda pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pyct 0.5.0 pypi_0 pypi pygments 2.17.1 pyhd8ed1ab_0 conda-forge pyopengl 3.1.6 pyhd8ed1ab_1 conda-forge pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge pyqt 5.15.10 py38hcec6c5f_0 anaconda pyqt5-sip 12.13.0 py38h6c40b1e_0 anaconda pyqtwebengine 5.15.10 py38hcec6c5f_0 anaconda pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.3 pyhd8ed1ab_0 conda-forge python 3.8.18 h5ee71fb_0 anaconda python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge pyyaml 6.0.1 py38h6c40b1e_0 anaconda pyyaml-env-tag 0.1 pypi_0 pypi pyzmq 25.1.0 py38hcec6c5f_0 anaconda qt-main 5.15.2 hf83fbd5_10 anaconda qt-webengine 5.15.9 h90a370e_7 anaconda qtconsole 5.5.1 pyhd8ed1ab_0 conda-forge qtconsole-base 5.5.1 pyha770c72_0 conda-forge qtpy 2.4.1 pyhd8ed1ab_0 conda-forge re2 2023.06.02 hd34609a_0 conda-forge readline 8.2 h9e318b2_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge responses 0.24.1 pyhd8ed1ab_0 conda-forge scikit-learn 1.3.0 py38h3ea8b11_0 anaconda scipy 1.10.1 py38h9034365_1 anaconda setuptools 68.2.2 pyhd8ed1ab_0 conda-forge sip 6.7.12 py38hcec6c5f_0 anaconda six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h6c40b1e_0 anaconda stack_data 0.6.2 pyhd8ed1ab_0 conda-forge tblib 2.0.0 pyhd8ed1ab_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tk 8.6.12 h5d9f67b_0 anaconda toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.3 py38h6c40b1e_0 anaconda tqdm 4.66.1 pypi_0 pypi traitlets 5.13.0 pyhd8ed1ab_0 conda-forge types-pyyaml 6.0.12.12 pyhd8ed1ab_0 conda-forge typing_extensions 4.8.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge urllib3 2.1.0 pyhd8ed1ab_0 conda-forge watchdog 3.0.0 pypi_0 pypi wcwidth 0.2.10 pyhd8ed1ab_0 conda-forge wheel 0.41.3 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xyzservices 2023.10.1 pyhd8ed1ab_0 conda-forge xz 5.4.2 h6c40b1e_0 anaconda yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.5 h93d8f39_0 conda-forge zict 3.0.0 pyhd8ed1ab_0 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h4dc903c_0 anaconda zstd 1.5.5 hc035e20_0 anaconda`

Any advice on what to try next? thanks!

alemessurier commented 7 months ago

I have also tried:

$ conda create -n phy2 -y cython dask h5py joblib matplotlib numpy pillow pip pyopengl pyqt pyqtwebengine pytest python=3.8 qtconsole requests responses scikit-learn scipy traitlets $ conda activate phy2 (phy2) $ pip install phy --pre --upgrade

and I get this error:

(phy2)$ phy template-gui ./params.py --debug /Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/gloo/variable.py:86: FutureWarning: In the futurenp.boolwill be defined as the corresponding NumPy scalar. gl.GL_BOOL: (1, gl.GL_BOOL, np.bool), Traceback (most recent call last): File "/Users/aml717/opt/anaconda3/envs/phy2/bin/phy", line 5, in <module> from phy.apps import phycli File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/apps/__init__.py", line 25, in <module> from .base import ( # noqa File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/apps/base.py", line 26, in <module> from phy.cluster._utils import RotatingProperty File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/cluster/__init__.py", line 9, in <module> from .views import * # noqa File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/cluster/views/__init__.py", line 10, in <module> from .base import ManualClusteringView # noqa File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/cluster/views/base.py", line 21, in <module> from phy.plot import PlotCanvas, NDC, extend_bounds File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/__init__.py", line 17, in <module> from .base import BaseVisual, GLSLInserter, BaseCanvas, BaseLayout File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/base.py", line 20, in <module> from . import gloo File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/gloo/__init__.py", line 10, in <module> from .program import Program File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/gloo/program.py", line 18, in <module> from .variable import Uniform, Attribute File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/phy/plot/gloo/variable.py", line 86, in <module> gl.GL_BOOL: (1, gl.GL_BOOL, np.bool), File "/Users/aml717/opt/anaconda3/envs/phy2/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'bool'. np.boolwas a deprecated alias for the builtinbool. To avoid this error in existing code, useboolby itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.bool_here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Here is my conda environment: `(phy2) $ conda list

packages in environment at /Users/aml717/opt/anaconda3/envs/phy2:

#

Name Version Build Channel

appnope 0.1.2 py38hecd8cb5_1001
asttokens 2.0.5 pyhd3eb1b0_0
backcall 0.2.0 pyhd3eb1b0_0
blas 1.0 openblas
bokeh 2.4.3 py38hecd8cb5_0
bottleneck 1.3.5 py38h67323c0_0
brotli 1.0.9 hca72f7f_7
brotli-bin 1.0.9 hca72f7f_7
brotli-python 1.0.9 py38he9d5cce_7
c-ares 1.19.1 h6c40b1e_0
ca-certificates 2023.08.22 hecd8cb5_0
certifi 2023.11.17 py38hecd8cb5_0
cffi 1.16.0 py38h6c40b1e_0
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 py38hecd8cb5_0
cloudpickle 2.2.1 py38hecd8cb5_0
colorcet 3.0.1 pypi_0 pypi comm 0.1.2 py38hecd8cb5_0
contourpy 1.0.5 py38haf03e11_0
cryptography 41.0.3 py38h30e54ef_0
cycler 0.11.0 pyhd3eb1b0_0
cyrus-sasl 2.1.28 h3973f50_1
cython 3.0.0 py38h6c40b1e_0
cytoolz 0.12.0 py38hca72f7f_0
dask 2023.4.1 py38hecd8cb5_1
dask-core 2023.4.1 py38hecd8cb5_0
debugpy 1.6.7 py38hcec6c5f_0
decorator 5.1.1 pyhd3eb1b0_0
distributed 2023.4.1 py38hecd8cb5_1
exceptiongroup 1.0.4 py38hecd8cb5_0
executing 0.8.3 pyhd3eb1b0_0
fonttools 4.25.0 pyhd3eb1b0_0
freetype 2.12.1 hd8bbffd_0
fsspec 2023.9.2 py38hecd8cb5_0
gettext 0.21.0 he85b6c0_1
ghp-import 2.1.0 pypi_0 pypi giflib 5.2.1 h6c40b1e_3
glib 2.69.1 hfff2838_2
gst-plugins-base 1.14.1 hcec6c5f_1
gstreamer 1.14.1 h6c40b1e_1
h5py 3.9.0 py38hf9d4033_0
hdf5 1.12.1 ha01d115_3
heapdict 1.0.1 pyhd3eb1b0_0
icu 73.1 hcec6c5f_0
idna 3.4 py38hecd8cb5_0
importlib-metadata 6.0.0 py38hecd8cb5_0
importlib_metadata 6.0.0 hd3eb1b0_0
importlib_resources 6.1.0 py38hecd8cb5_0
iniconfig 1.1.1 pyhd3eb1b0_0
ipykernel 6.25.0 py38h20db666_0
ipython 8.12.2 py38hecd8cb5_0
jedi 0.18.1 py38hecd8cb5_1
jinja2 3.1.2 py38hecd8cb5_0
joblib 1.2.0 py38hecd8cb5_0
jpeg 9e h6c40b1e_1
jupyter_client 8.6.0 py38hecd8cb5_0
jupyter_core 5.5.0 py38hecd8cb5_0
kiwisolver 1.4.4 py38hcec6c5f_0
krb5 1.20.1 h428f121_1
lcms2 2.12 hf1fd2bf_0
lerc 3.0 he9d5cce_0
libbrotlicommon 1.0.9 hca72f7f_7
libbrotlidec 1.0.9 hca72f7f_7
libbrotlienc 1.0.9 hca72f7f_7
libclang 14.0.6 default_hd95374b_1
libclang13 14.0.6 default_habbcc1a_1
libcurl 8.4.0 hf20ceda_0
libcxx 14.0.6 h9765a3e_0
libdeflate 1.17 hb664fd8_1
libedit 3.1.20221030 h6c40b1e_0
libev 4.33 h9ed2024_1
libffi 3.4.4 hecd8cb5_0
libgfortran 5.0.0 11_3_0_hecd8cb5_28
libgfortran5 11.3.0 h9dfd629_28
libiconv 1.16 hca72f7f_2
libllvm14 14.0.6 h91fad77_3
libnghttp2 1.57.0 h9beae6a_0
libopenblas 0.3.21 h54e7dc3_0
libpng 1.6.39 h6c40b1e_0
libpq 12.15 h04015c4_1
libsodium 1.0.18 h1de35cc_0
libssh2 1.10.0 h04015c4_2
libtiff 4.5.1 hcec6c5f_0
libwebp 1.3.2 hf6ce154_0
libwebp-base 1.3.2 h6c40b1e_0
libxml2 2.10.4 h1bd7e62_1
llvm-openmp 14.0.6 h0dcd299_0
locket 1.0.0 py38hecd8cb5_0
lz4-c 1.9.4 hcec6c5f_0
markdown 3.5.1 pypi_0 pypi markupsafe 2.1.1 py38hca72f7f_0
matplotlib 3.7.2 py38hecd8cb5_0
matplotlib-base 3.7.2 py38hee32256_0
matplotlib-inline 0.1.6 py38hecd8cb5_0
mergedeep 1.3.4 pypi_0 pypi mkdocs 1.5.3 pypi_0 pypi msgpack-python 1.0.3 py38haf03e11_0
mtscomp 1.0.2 pypi_0 pypi munkres 1.1.4 py_0
mysql 5.7.24 h1a8d504_2
ncurses 6.4 hcec6c5f_0
nest-asyncio 1.5.6 py38hecd8cb5_0
numexpr 2.8.4 py38h57a7bef_1
numpy 1.24.3 py38h57a7bef_0
numpy-base 1.24.3 py38hc93c6d9_0
openjpeg 2.4.0 h66ea3da_0
openssl 3.0.12 hca72f7f_0
packaging 23.1 py38hecd8cb5_0
pandas 2.0.3 py38h3ea8b11_0
param 2.0.1 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0
partd 1.4.1 py38hecd8cb5_0
pathspec 0.11.2 pypi_0 pypi pcre 8.45 h23ab428_0
pexpect 4.8.0 pyhd3eb1b0_3
phy 2.0b5 pypi_0 pypi phylib 2.4.3 pypi_0 pypi pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 10.0.1 py38h7d39338_0
pip 23.3 py38hecd8cb5_0
platformdirs 3.10.0 py38hecd8cb5_0
pluggy 1.0.0 py38hecd8cb5_1
ply 3.11 py38_0
pooch 1.7.0 py38hecd8cb5_0
prompt-toolkit 3.0.36 py38hecd8cb5_0
psutil 5.9.0 py38hca72f7f_0
ptyprocess 0.7.0 pyhd3eb1b0_2
pure_eval 0.2.2 pyhd3eb1b0_0
pycparser 2.21 pyhd3eb1b0_0
pyct 0.5.0 pypi_0 pypi pygments 2.15.1 py38hecd8cb5_1
pyopengl 3.1.1a1 py38hecd8cb5_0
pyopenssl 23.2.0 py38hecd8cb5_0
pyparsing 3.0.9 py38hecd8cb5_0
pyqt 5.15.10 py38hcec6c5f_0
pyqt5-sip 12.13.0 py38h6c40b1e_0
pyqtwebengine 5.15.10 py38hcec6c5f_0
pysocks 1.7.1 py38_1
pytest 7.4.0 py38hecd8cb5_0
python 3.8.18 h5ee71fb_0
python-dateutil 2.8.2 pyhd3eb1b0_0
python-lmdb 1.4.1 py38hcec6c5f_0
python-tzdata 2023.3 pyhd3eb1b0_0
pytz 2023.3.post1 py38hecd8cb5_0
pyyaml 6.0.1 py38h6c40b1e_0
pyyaml-env-tag 0.1 pypi_0 pypi pyzmq 25.1.0 py38hcec6c5f_0
qt-main 5.15.2 hf83fbd5_10
qt-webengine 5.15.9 h90a370e_7
qtconsole 5.5.0 py38hecd8cb5_0
qtpy 2.4.1 py38hecd8cb5_0
readline 8.2 hca72f7f_0
requests 2.31.0 py38hecd8cb5_0
responses 0.13.3 pyhd3eb1b0_0
scikit-learn 1.3.0 py38h3ea8b11_0
scipy 1.10.1 py38h9034365_1
setuptools 68.0.0 py38hecd8cb5_0
sip 6.7.12 py38hcec6c5f_0
six 1.16.0 pyhd3eb1b0_1
sortedcontainers 2.4.0 pyhd3eb1b0_0
sqlite 3.41.2 h6c40b1e_0
stack_data 0.2.0 pyhd3eb1b0_0
tblib 1.7.0 pyhd3eb1b0_0
threadpoolctl 2.2.0 pyh0d69192_0
tk 8.6.12 h5d9f67b_0
tomli 2.0.1 py38hecd8cb5_0
toolz 0.12.0 py38hecd8cb5_0
tornado 6.3.3 py38h6c40b1e_0
tqdm 4.66.1 pypi_0 pypi traitlets 5.7.1 py38hecd8cb5_0
typing_extensions 4.7.1 py38hecd8cb5_0
urllib3 1.26.18 py38hecd8cb5_0
watchdog 3.0.0 pypi_0 pypi wcwidth 0.2.5 pyhd3eb1b0_0
wheel 0.41.2 py38hecd8cb5_0
xz 5.4.2 h6c40b1e_0
yaml 0.2.5 haf1e3a3_0
zeromq 4.3.4 h23ab428_0
zict 3.0.0 py38hecd8cb5_0
zipp 3.11.0 py38hecd8cb5_0
zlib 1.2.13 h4dc903c_0
zstd 1.5.5 hc035e20_0 `

alemessurier commented 7 months ago

ok I just found this issue related to openGL being deprecated on macs, I wonder if this is the root of my issues too: https://github.com/cortex-lab/phy/issues/1226

Does this depend on which macOS version I'm running?

alemessurier commented 7 months ago

Ok, I was finally able to open the gui by changing python in the environment.yml to python==3.11 and building the conda environment from the .yml. However, I end up with the empty plots issue from #1226 so I guess I'm giving up on using phy on my mac unless anyone has found a way around this!!

zm711 commented 7 months ago

@alemessurier,

I really don't think Phy will work on Macs. But yeah technically you might be able to use an older version of macOS and get it working since openGL was part of older Macs. I think an older Intel Mac might be your best bet (but in that case you might need older python etc). So it probably isn't worth the effort.

alemessurier commented 7 months ago

@zm711 thanks, that's good to know! It might be nice to mention the issue with newer macs/macOS in the readme - I don't think I saw anything about this, just assumed phy was generally compatible with macs since my labmate uses it on an older macbook.

zm711 commented 7 months ago

Thanks @alemessurier, I'm a contributor, but I'm not the main person, so I can't add it to the readme (PRs get merged about 1 or 2x / year), but Phy used to work on Macs fine. The switch over to their own Arm-based on chips/Metal instead is the main problem here. So when Phy was first written openGl was fine, but Apple has been slowly removing support to push people to program with Metal.

alemessurier commented 7 months ago

got it, thanks!