biocore / biom-format

The Biological Observation Matrix (BIOM) Format Project
http://biom-format.org
Other
89 stars 95 forks source link

Install biom-format with python 2.7 #878

Closed jconoranderson closed 2 years ago

jconoranderson commented 2 years ago

I need to install biom-format as a dependency to Qiime which runs on python 2.7, and am getting the error that Python 2.7 is no longer supported

Even when I try to install an older version as a workaround per this previous issue - https://github.com/biocore/biom-format/issues/839

The full trace I am getting is as follows:

Collecting qiime
  Using cached https://files.pythonhosted.org/packages/a2/9e/094c330d85e6d519f643f6c6381a575df7a09f1f9bcd59bddbfbdd1a8506/qiime-1.9.1.tar.gz
Requirement already satisfied: numpy>=1.9.0 in /Users/canderson/opt/anaconda3/envs/qiime1/lib/python2.7/site-packages (from qiime) (1.16.6)
Collecting scipy>=0.14.0
  Using cached https://files.pythonhosted.org/packages/dc/7a/3de1700fb471a6f56353446b4b962a7e4a5baaf24e5e4dec2d91d5f500da/scipy-1.2.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting cogent==1.5.3
  Using cached https://files.pythonhosted.org/packages/1f/9f/c6f6afe09a3d62a6e809c7745413ffff0f1e8e04d88ab7b56faedf31fe28/cogent-1.5.3.tgz
Collecting natsort<4.0.0
  Using cached https://files.pythonhosted.org/packages/c5/4f/4bb6388d3680566585c10197002d59c764f3fa8033ccc43df7a4a1979fdc/natsort-3.5.6-py2.py3-none-any.whl
Collecting matplotlib!=1.4.2,>=1.1.0
  Using cached https://files.pythonhosted.org/packages/30/0e/30f89d643bca7d692b84801bb0c6040cb86021b69cb82482ebfb87681e64/matplotlib-2.2.5-cp27-cp27m-macosx_10_9_x86_64.whl
Collecting pynast==1.2.2
  Using cached https://files.pythonhosted.org/packages/a0/82/f381ff91afd7a2d92e74c7790823e256d87d5cd0a98c12eaac3d3ec64b8f/pynast-1.2.2.tar.gz
Collecting qcli<0.2.0,>=0.1.1
  Using cached https://files.pythonhosted.org/packages/75/1b/1de6c8daa8dddf9ff9d46ee13cd53231aef4df5fe29d647bd4587561ef77/qcli-0.1.1.tar.gz
Collecting gdata
  Using cached https://files.pythonhosted.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz
Collecting biom-format<2.2.0,>=2.1.4
  Using cached https://files.pythonhosted.org/packages/2b/8f/ef865d43a06dd3d1b09808fbd129074e64127fa8db0b93b5e0cf1d1a50de/biom-format-2.1.10.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/canderson/opt/anaconda3/envs/qiime1/bin/python /Users/canderson/opt/anaconda3/envs/qiime1/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/tmpV4GdJD
       cwd: /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-install-4sAjhl/biom-format
  Complete output (13 lines):
  /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-build-env-sxy1bU/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-install-4sAjhl/biom-format/biom/_filter.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-build-env-sxy1bU/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-install-4sAjhl/biom-format/biom/_subsample.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-build-env-sxy1bU/overlay/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/pip-install-4sAjhl/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/canderson/opt/anaconda3/envs/qiime1/bin/python /Users/canderson/opt/anaconda3/envs/qiime1/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/bg/jv0b8cmn4hq1x2msdj1mflq9dy7c1d/T/tmpV4GdJD Check the logs for full command output.

Is there any way around this? I have just started with a new microbiome research lab and they have not yet transitioned to qiime 2.

wasade commented 2 years ago

I believe this would fall under installing QIIME 1.9.1 in general, and an issue for that project, however support for QIIME 1 ended January 2018 (http://qiime.org/) and they are actively advise users migrate to QIIME 2. The QIIME 1 project does maintain pre-built VirtualBox images which should work if there is a need to use QIIME 1.