nextstrain / augur

Pipeline components for real-time phylodynamic analysis
https://docs.nextstrain.org/projects/augur/
GNU Affero General Public License v3.0
268 stars 128 forks source link

Cannot install under python 3.9 due to datrie #883

Open jameshadfield opened 2 years ago

jameshadfield commented 2 years ago

Posting here in case others have solutions.

TL;DR Install works under python 3.8

Details

pip cache purge
python3 -m pip install -e '.[dev]'
...
  × Building wheel for datrie (pyproject.toml) did not run successfully.
  │ exit code: 1
    error: command '/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_croot-8rcp3rdc/python-split_1649141342860/_build_env/bin/llvm-ar' failed: No such file or directory
      [end of output]
Failed to build datrie
ERROR: Could not build wheels for datrie, which is required to install pyproject.toml-based projects

Same problem occurs when trying to install datrie itself in a clean python environment:

conda create -y -n test python=3.9
conda activate test
python -m pip install --upgrade pip # pip 22.0.4
pip cache purge
pip install datrie
# same error as above

(Temporary) solution

Use python 3.8, where a datrie wheel exists.

victorlin commented 2 years ago

It works fine for me:

mamba create -n test python=3.9
conda activate test
sw_vers  # macOS 11.6.1 20G224
python --version  # Python 3.9.12
pip --version  # pip 22.0.4
pip cache purge
python3 -m pip install -e '.[dev]'

Output:

  Building wheel for datrie (pyproject.toml) ... done
  Created wheel for datrie: filename=datrie-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl size=130970 sha256=4269810f50b8729bfc6511dcc6e0a586a42fa737996a8ebc45b6c8e19dd60ae2
  Stored in directory: /Users/vlin/Library/Caches/pip/wheels/e9/04/17/1d0bd7b371c1514a6216fd2de4f33742a071c9392c8f48bcc1
victorlin commented 2 years ago

Seems to be the same as Hekstra-Lab/reciprocalspaceship#36 and https://groups.google.com/g/anvio/c/ayvtZoUWbJI but don't see any clear solutions there.

victorlin commented 2 years ago

@jameshadfield downgrading to 2 - Usability w/ workaround since the workaround is to use python=3.8.