dattalab / keypoint-moseq

https://keypoint-moseq.readthedocs.io
Other
68 stars 28 forks source link

make editable refer to root dir with setup.py #6

Closed a-sumo closed 1 year ago

a-sumo commented 1 year ago

I'm using an M1 chip and I encountered issue #5 . As suggested, I ran:

git clone https://github.com/dattalab/keypoint-moseq && cd keypoint-moseq
conda env create -f conda_envs/environment.linux_cpu.yml

And encountered the following error:

Pip subprocess error:                                                           
ERROR: file:///Users/armand/Documents/keypoint-moseq/conda_envs (from -r /Users/armand/Documents/keypoint-moseq/conda_envs/condaenv.m8fzb9y8.requirements.txt (line 2)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.                                                                  

failed                                                                          

CondaEnvException: Pip failed    

Which turned out to be caused by the line --editable in the environment.linux_cpu.yml not referring to the root directory containing the setup.py file. After making the changes in this commit, I successfully created the conda environment. I assume this must be true for all 4 environments in conda_envs/ directory so I made the same change in all 4 environment files.

calebweinreb commented 1 year ago

Thanks for the PR! Were you able to import keypoint_moseq and/or jax in the resulting environment? I want to confirm whether this is a good solution for M1 users.

talmo commented 1 year ago

FYI: Here's the related issue for Apple Silicon + Jax: https://github.com/google/jax/issues/8074

(As of March 2023, it doesn't sound like it works natively yet with Metal.)

Can also confirm that this PR fixes the conda environment installations.