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!