EricKenjiLee / WaveMAP_Paper

This repo allows for the complete reproduction, from processed data, of all the main and supplemental figures in the manuscript Non-linear Dimensionality Reduction on Extracellular Waveforms Reveals Physiological, Functional, and Laminar Diversity in Premotor Cortex.
MIT License
20 stars 3 forks source link

Installation step - pip install #6

Open yanspikesorting opened 1 week ago

yanspikesorting commented 1 week ago

Dear Erick, I am trying to install and use your code in windows - anaconda promt. But facing an issue that I am not sure if related to the requirements.txt file: I am using the following lines and getting errors when trying the pip install steps, please see below:

In C:\Documents\TEST\

mkdir WaveMAP_Env cd WaveMAP_Env

%From https://docs.anaconda.com/miniconda/ curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe start /wait "" .\miniconda.exe /S del miniconda.exe

conda create --name WaveMAP_Env python=3.8 conda activate WaveMAP_Env

pip install -r requirements.txt %ERROR 1 pip install wavemap-paper %ERROR 2

%ERROR 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pip install -r requirements.txt

Building wheels for collected packages: cylouvain Building wheel for cylouvain (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [18 lines of output] C:\Users\yaguilarayala\AppData\Local\anaconda3\envs\WaveMAP_Env\lib\site-packages\setuptools__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  running bdist_wheel
  running build
  running build_py
  creating build\lib.win-amd64-cpython-38\cylouvain
  copying cylouvain\__init__.py -> build\lib.win-amd64-cpython-38\cylouvain
  running build_ext
  building 'cylouvain._louvain' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cylouvain Running setup.py clean for cylouvain Failed to build cylouvain ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cylouvain)

%ERROR 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pip install wavemap-paper

Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

I really appreciate any comment on this, thanks---

EricKenjiLee commented 1 week ago

It looks like you are missing the appropriate C++ compiler? Specifically, error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ Unfortunately, CyLouvain is not well-maintained (and hasn't been updated for 6 years) so I no longer suggest using it. I suggest dropping it from the requirements.txt and reinstalling. Honestly, you don't need most of the things in the requirements.txt file, that was just a file generated for my own use on my particular computer. I instead suggest you use WaveMAP by following the example here.

Let me know if you have any questions!