Last active
April 5, 2022 08:08
-
-
Save nylander/162791ff4986abf86864a22896fddc14 to your computer and use it in GitHub Desktop.
Fix error in python for installing nf-core on Ubuntu 20.04, python 3.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Recently, I tried to upgrade [nf-core](https://nf-co.re/) on my Ubuntu Linux but the execution after installation failed with errors from a python module. | |
| Upgrading the python library ["rich"](https://rich.readthedocs.io/en/stable/introduction.html) solved the issue. | |
| Steps below: | |
| ``` | |
| $ cat /etc/lsb-release | |
| DISTRIB_ID=Ubuntu | |
| DISTRIB_RELEASE=20.04 | |
| DISTRIB_CODENAME=focal | |
| DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS" | |
| $ python -V | |
| Python 3.8.10 | |
| $ pip3 -V | |
| pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) | |
| $ pip3 install nf-core | |
| $ nf-core --version | |
| Traceback (most recent call last): | |
| File "/home/nylander/.local/bin/nf-core", line 5, in <module> | |
| from nf_core.__main__ import run_nf_core | |
| File "/home/nylander/.local/lib/python3.8/site-packages/nf_core/__main__.py", line 20, in <module> | |
| import nf_core.lint | |
| File "/home/nylander/.local/lib/python3.8/site-packages/nf_core/lint/__init__.py", line 21, in <module> | |
| import nf_core.modules.lint | |
| File "/home/nylander/.local/lib/python3.8/site-packages/nf_core/modules/__init__.py", line 11, in <module> | |
| from .info import ModuleInfo | |
| File "/home/nylander/.local/lib/python3.8/site-packages/nf_core/modules/info.py", line 9, in <module> | |
| from rich.console import Group | |
| ImportError: cannot import name 'Group' from 'rich.console' (/home/nylander/.local/lib/python3.8/site-packages/rich/console.py) | |
| $ pip3 uninstall nf-core | |
| $ pip3 install --upgrade --user rich | |
| $ pip3 show rich | |
| Name: rich | |
| Version: 12.0.1 | |
| Summary: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal | |
| Home-page: https://github.com/willmcgugan/rich | |
| Author: Will McGugan | |
| Author-email: willmcgugan@gmail.com | |
| License: MIT | |
| Location: /home/nylander/.local/lib/python3.8/site-packages | |
| Requires: pygments, commonmark | |
| Required-by: rich-click | |
| $ pip3 install nf-core | |
| $ nf-core --version | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment