keep getting error when installing Lefse on Mac M1, python 2.7.15

Hi,
I am trying to install Lefse on my Mac M1 laptop and keep getting the following error ---


Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  • feature:/osx-arm64::__osx==14.4.1=0
  • lefse -> matplotlib-base -> __osx[version='>=10.9|>=11.0']
  • python=3.10 -> ncurses[version='>=6.4,<7.0a0'] -> __osx[version='>=10.9']

Your installed version is: 14.4.1


If I understand correctly, it could be the problem of my OS, or python version??
I have installed python 2.7.15 version correctly. How do I fix the issue with my OS? Is there a workaround solution?

I have seen a post where the exact same problem was discussed:
LEfSe after QIIME2 to test at all taxonomic levels - #21 by Jalalalzanin

but this seems to not to be helpful to me. Any suggestions would be apprecaited! Thank you!

Arlandan

Hi @arlandan,
I am not sure exactly what this issue is!

What is the install command that you are running?

I found this issue where a person solved a similar issue by pip installing. Maybe give that a try :person_shrugging:

Hi @cherman2 ,

Thank you for the quick reply! I tried pip install using this command:

pip install lefse

and get the following error:
ERROR: Command errored out with exit status 1: /Users/ran/.pyenv/versions/2.7.15/bin/python2.7 /Users/ran/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/tmpEqzbiB Check the logs for full command output.

To answer your question, this is the command I used that gave the error in my original post:

conda install -c bioconda lefse

This is the complete error message:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  • feature:/osx-arm64::__osx==14.4.1=0
  • lefse -> matplotlib-base -> __osx[version='>=10.9|>=11.0']
  • python=3.10 -> ncurses[version='>=6.4,<7.0a0'] -> __osx[version='>=10.9']

Your installed version is: 14.4.1

I also tried this command: conda create -n lefse -c conda-forge python=2.7.15, and it gave another error as follows:


Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  • python=2.7.15

Current channels:

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

can you let me know what I should try next?

Thanks!

Hi @arlandan,
Have you tried upgrading your python?

Hello!
I would try to install it into a new environment to avoid any conflicts between packages. Also, for me mixing sources solved the issue:

#from base env
conda create -n lefse -c conda-forge -c bioconda lefse

#activate it
conda activate lefse
2 Likes

I have python3.10.12 in my laotop, which was installed long ago. I checked it with

phython3

and found it was actually activated. I tried to set it as default env with

pyenv global 3.10.12

but did not work --- see below

pyenv: version `3.10.12' not installed

Can you tell me why the phython3 is not activated/detected by the code?

I saw somewhere in the forum that older version of python (2.7.15) is recommended for lefse, so I installed 2.7.15 as well before trying lefse. While setting python3 as default env did not work, I went ahead and tried

pip install lefse

and it said:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality

Collecting lefse
  Using cached lefse-1.1.2.tar.gz (53 kB)
Collecting numpy
  Using cached numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl (13.9 MB)
Collecting matplotlib
  Using cached matplotlib-2.2.5-cp27-cp27m-macosx_10_9_x86_64.whl (12.9 MB)
Collecting biom-format
  Using cached biom-format-2.1.10.tar.gz (11.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/ran/.pyenv/versions/2.7.15/bin/python2.7 /Users/ran/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/tmpSBwAsr
       cwd: /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-install-fSqAer/biom-format
  Complete output (13 lines):
  /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-build-env-acBuUL/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-install-fSqAer/biom-format/biom/_filter.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-build-env-acBuUL/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-install-fSqAer/biom-format/biom/_subsample.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-build-env-acBuUL/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/pip-install-fSqAer/biom-format/biom/_transform.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  Compiling biom/_filter.pyx because it changed.
  Compiling biom/_transform.pyx because it changed.
  Compiling biom/_subsample.pyx because it changed.
  [1/3] Cythonizing biom/_filter.pyx
  [2/3] Cythonizing biom/_subsample.pyx
  [3/3] Cythonizing biom/_transform.pyx
  Python 2.7 is no longer supported
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/ran/.pyenv/versions/2.7.15/bin/python2.7 /Users/ran/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/4y/lvhqy_612pvf3ptlkr3p3snc0000gn/T/tmpSBwAsr Check the logs for full command output.

Then I tried to install python3 again in the same way of installing python 2.7.15 (assuming the pythin3 originally in my laptop was not installed in the correct env...)

pyenv install 3.10.12

It was successfully installed. I tried to set the new installed python3 as default again using the same cold above, and it worked!

Then I proceeded to install lefse:

pip install lefse

and it said:

Collecting lefse
  Downloading lefse-1.1.2-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 kB 1.3 MB/s eta 0:00:00
Collecting rpy2
  Downloading rpy2-3.5.16-cp310-cp310-macosx_11_0_x86_64.whl (260 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 260.8/260.8 kB 5.9 MB/s eta 0:00:00
Collecting biom-format
  Downloading biom_format-2.1.15-cp310-cp310-macosx_10_9_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 23.5 MB/s eta 0:00:00
Collecting numpy
  Downloading numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl (20.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.6/20.6 MB 23.0 MB/s eta 0:00:00
Collecting matplotlib
  Downloading matplotlib-3.8.4-cp310-cp310-macosx_10_12_x86_64.whl (7.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 24.7 MB/s eta 0:00:00
Collecting scipy>=1.3.1
  Downloading scipy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl (39.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.3/39.3 MB 23.1 MB/s eta 0:00:00
Collecting pandas>=0.20.0
  Downloading pandas-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl (12.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 18.8 MB/s eta 0:00:00
Collecting h5py
  Downloading h5py-3.11.0-cp310-cp310-macosx_10_9_x86_64.whl (3.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 21.8 MB/s eta 0:00:00
Collecting click
  Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting pillow>=8
  Downloading pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl (3.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 21.8 MB/s eta 0:00:00
Collecting pyparsing>=2.3.1
  Downloading pyparsing-3.1.2-py3-none-any.whl (103 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.2/103.2 kB 6.4 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-24.0-py3-none-any.whl (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 3.0 MB/s eta 0:00:00
Collecting cycler>=0.10
  Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Collecting python-dateutil>=2.7
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 11.4 MB/s eta 0:00:00
Collecting kiwisolver>=1.3.1
  Downloading kiwisolver-1.4.5-cp310-cp310-macosx_10_9_x86_64.whl (68 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.1/68.1 kB 3.7 MB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.51.0-cp310-cp310-macosx_10_9_x86_64.whl (2.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 18.4 MB/s eta 0:00:00
Collecting contourpy>=1.0.1
  Downloading contourpy-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl (260 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 260.8/260.8 kB 10.0 MB/s eta 0:00:00
Collecting tzlocal
  Downloading tzlocal-5.2-py3-none-any.whl (17 kB)
Collecting cffi>=1.15.1
  Downloading cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl (182 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.5/182.5 kB 7.8 MB/s eta 0:00:00
Collecting jinja2
  Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 7.7 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.22-py3-none-any.whl (117 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.6/117.6 kB 5.4 MB/s eta 0:00:00
Collecting pytz>=2020.1
  Downloading pytz-2024.1-py2.py3-none-any.whl (505 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 505.5/505.5 kB 12.2 MB/s eta 0:00:00
Collecting tzdata>=2022.7
  Downloading tzdata-2024.1-py2.py3-none-any.whl (345 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 345.4/345.4 kB 10.1 MB/s eta 0:00:00
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl (14 kB)
Installing collected packages: pytz, tzlocal, tzdata, six, pyparsing, pycparser, pillow, packaging, numpy, MarkupSafe, kiwisolver, fonttools, cycler, click, scipy, python-dateutil, jinja2, h5py, contourpy, cffi, rpy2, pandas, matplotlib, biom-format, lefse
Successfully installed MarkupSafe-2.1.5 biom-format-2.1.15 cffi-1.16.0 click-8.1.7 contourpy-1.2.1 cycler-0.12.1 fonttools-4.51.0 h5py-3.11.0 jinja2-3.1.4 kiwisolver-1.4.5 lefse-1.1.2 matplotlib-3.8.4 numpy-1.26.4 packaging-24.0 pandas-2.2.2 pillow-10.3.0 pycparser-2.22 pyparsing-3.1.2 python-dateutil-2.9.0.post0 pytz-2024.1 rpy2-3.5.16 scipy-1.13.0 six-1.16.0 tzdata-2024.1 tzlocal-5.2

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

I guess lefse was installed, while it did not say "lefse successfully installed" etc. how do I know if it's installed or working? since my input file for lefse is not ready, I am not ready to run the following code to see if it's working

lefse-format_input.py

thank you!

Hi @arlandan,
I dont know a lot about lefse, Here is what I would recommend to test it.

Are you able to run that command and see if it fails reasonable. I.e. saying that you don't have the correct input data.

As opposed to an unreasonable error like "lefse isn't installed".

Hi @timanix ,

I tried to install in base env, and got this error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                      

UnsatisfiableError: The following specifications were found to be incompatible with your system:

  - feature:/osx-arm64::__osx==14.4.1=0
  - lefse -> matplotlib-base -> __osx[version='>=10.9|>=11.0']

Your installed version is: 14.4.1

Question: do I need to download anything before running this code?

conda create -n lefse -c conda-forge -c bioconda lefse

Thank you!

Hi @cherman2 ,

I tried the following code:

lefse-format_input.py \
output/Useful-Information/input_table.tsv \
output/Useful-Information/formatted_table.in \
-c 1 \
-u 2 \
-o 1000000 \
--output_table output/Useful-Information/formatted_table.tsv

and got this error:

zsh: command not found: lefse-format_input.py

Lefse not installed?

Hello @arlandan :wave:

You may have found this already, but just in case, you could also ask about this on the BioBakery forums:

They probably know more about this than we do!

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.