From abd74548f57c7c6dae8fd7fde53615805e72811e Mon Sep 17 00:00:00 2001 From: Blaise Li <blaise.li__git@nsup.org> Date: Thu, 20 Dec 2018 11:28:42 +0100 Subject: [PATCH] More robust python module install. Depending on pip version, `pip3.6` sometimes fail with "ImportError: cannot import name 'main'". Using `python3.6 -m pip` instead avoids this. --- install.sh | 4 ++-- libhts/libhts.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 06391fd..5ddc41a 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/bin/sh python3.6 setup.py build_ext # .egg-link does not work with PYTHONPATH ? -pip3.6 install -e . -pip3.6 install --no-deps --ignore-installed . +python3.6 -m pip install -e . +python3.6 -m pip install --no-deps --ignore-installed . diff --git a/libhts/libhts.py b/libhts/libhts.py index 5b4e1b0..4e63398 100644 --- a/libhts/libhts.py +++ b/libhts/libhts.py @@ -139,7 +139,7 @@ def gtf_2_genes_exon_lengths(gtf_filename): def repeat_bed_2_lengths(repeat_bed): - """Computes the lengths of repeatitive elements in a bed file, grouped by families. + """Computes the lengths of repetitive elements in a bed file, grouped by families. This assumes that the elements have their names composed of the family name, then a colon, then a number. For instance: Simple_repeat|Simple_repeat|(TTTTTTG)n:1 -- GitLab