labsyspharm / scimap

Spatial Single-Cell Analysis Toolkit
https://scimap.xyz/
MIT License
71 stars 24 forks source link

"command not found: pipx" when setting up development environment #99

Closed kevinyamauchi closed 4 months ago

kevinyamauchi commented 4 months ago

Hello! I was following the contributor guide to set up the development environment and when I got to this step, I received the following error:

❯ pipx install poetry
zsh: command not found: pipx

I tried with pip install poetry and then I was able to continue. However, I'm not sure if there's a reason for using pipx over pip in this context.

edit: I'm not sure if this was an issue with how I installed poetry (I'm not familiar with poetry), but the installation failed. To reproduce:

conda create --name scimap -y python=3.9
conda activate scimap
pip install poetry
poetry install

Gives this error:

❯ poetry install
Installing dependencies from lock file

Package operations: 125 installs, 2 updates, 6 removals

  - Removing build (1.2.1)
  - Removing cffi (1.16.0)
  - Removing msgpack (1.0.8)
  - Removing pycparser (2.22)
  - Removing pyproject-hooks (1.0.0)
  - Removing shellingham (1.5.4)
  - Installing six (1.16.0)
  - Installing asttokens (2.4.1)
  - Installing executing (2.0.1)
  - Installing parso (0.8.3)
  - Installing pure-eval (0.2.2)
  - Installing pygments (2.17.2)
  - Installing traitlets (5.14.2)
  - Installing wcwidth (0.2.13)
  - Installing click (8.1.7)
  - Installing decorator (5.1.1)
  - Installing exceptiongroup (1.2.0)
  - Downgrading idna (3.7 -> 3.6)
  - Installing jedi (0.19.1)
  - Installing locket (1.0.0)
  - Installing matplotlib-inline (0.1.6)
  - Installing numpy (1.26.4)
  - Installing prompt-toolkit (3.0.43)
  - Installing python-dateutil (2.9.0.post0)
  - Installing stack-data (0.6.3)
  - Installing toolz (0.12.1)
  - Installing typing-extensions (4.10.0)
  - Installing cloudpickle (3.0.0)
  - Installing fsspec (2024.3.1)
  - Installing ipython (8.18.1)
  - Installing joblib (1.3.2)
  - Installing llvmlite (0.41.1)
  - Installing markupsafe (2.1.5)
  - Installing partd (1.4.1)
  - Installing pillow (10.3.0)
  - Installing psutil (5.9.8)
  - Installing pyyaml (6.0.1)
  - Installing scipy (1.12.0)
  - Installing threadpoolctl (3.4.0)
  - Installing asciitree (0.3.3): Failed

  ModuleNotFoundError

  No module named '_cffi_backend'

  at ~/miniconda3/envs/scimap/lib/python3.9/site-packages/xattr/lib.py:4 in <module>
        1│ import os
        2│ import sys
        3│
    →   4│ from ._lib import lib, ffi
        5│
        6│ XATTR_NOFOLLOW = lib.XATTR_XATTR_NOFOLLOW
        7│ XATTR_CREATE = lib.XATTR_XATTR_CREATE
        8│ XATTR_REPLACE = lib.XATTR_XATTR_REPLACE
        9│ XATTR_NOSECURITY = lib.XATTR_XATTR_NOSECURITY

Cannot install asciitree.

  - Installing babel (2.14.0)
  - Installing contourpy (1.2.0)
  - Installing cycler (0.12.1)
  - Installing dask (2023.12.1)
  - Installing fasteners (0.19)
  - Installing fonttools (4.50.0)
  - Installing importlib-resources (6.4.0)
  - Installing jinja2 (3.1.3)
  - Installing kiwisolver (1.4.5)
  - Installing networkx (3.2.1)
  - Installing numba (0.58.1)
  - Installing numcodecs (0.12.1)
  - Installing pyparsing (3.1.2)
  - Installing pytz (2024.1)
  - Installing scikit-learn (1.4.2)
  - Installing snowballstemmer (2.2.0)
  - Installing texttable (1.7.0)
  - Installing tifffile (2023.12.9)
  - Installing tzdata (2024.1)

This is in the context of the JOSS review: https://github.com/openjournals/joss-reviews/issues/6604

ajitjohnson commented 4 months ago

Dear @kevinyamauchi thank you for identifying this issue. I have updated the documentation to recommend users follow the instructions on poetry website for installation.

Briefly, pipx needs to be first installed using the instructions provided here: https://pipx.pypa.io/stable/installation/

# if macOS; assuming brew has been installed
brew install pipx
pipx ensurepath

I just tested it on macOS, and the installation went smoothly. I am unable to reproduce the error you encountered. Can I ask what operating system are you using? Thank you.

kevinyamauchi commented 4 months ago

Thanks for clarifying and updating the docs @ajitjohnson !