Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

higlass-manage start > SyntaxError: invalid syntax #69

Closed
Nico-FR opened this issue Dec 8, 2020 · 20 comments
Closed

higlass-manage start > SyntaxError: invalid syntax #69

Nico-FR opened this issue Dec 8, 2020 · 20 comments

Comments

@Nico-FR
Copy link

Nico-FR commented Dec 8, 2020

Hi,
I installed Docker version 19.03.14, build 5eb3275d40 and used pip version 20.3.1 from python version 3.5 to install higlass-manage.
But nothing is working:

higlass-manage start

Traceback (most recent call last):
  File "/home/nmary/.local/bin/higlass-manage", line 5, in <module>
    from higlass_manage.cli import cli
  File "/home/nmary/.local/lib/python3.5/site-packages/higlass_manage/cli.py", line 3, in <module>
    from higlass_manage.ingest import ingest
  File "/home/nmary/.local/lib/python3.5/site-packages/higlass_manage/ingest.py", line 2, in <module>
    import clodius.cli.aggregate as cca
  File "/home/nmary/.local/lib/python3.5/site-packages/clodius/cli/__init__.py", line 18, in <module>
    from . import (  # noqa: F401
  File "/home/nmary/.local/lib/python3.5/site-packages/clodius/cli/aggregate.py", line 204
    print(f"BEDPEDB Version {BED2DDB_VERSION}")
                                             ^
SyntaxError: invalid syntax

higlass-manage view hic-resolutions.cool

Traceback (most recent call last):
  File "/home/nmary/.local/bin/higlass-manage", line 5, in <module>
    from higlass_manage.cli import cli
  File "/home/nmary/.local/lib/python3.5/site-packages/higlass_manage/cli.py", line 3, in <module>
    from higlass_manage.ingest import ingest
  File "/home/nmary/.local/lib/python3.5/site-packages/higlass_manage/ingest.py", line 2, in <module>
    import clodius.cli.aggregate as cca
  File "/home/nmary/.local/lib/python3.5/site-packages/clodius/cli/__init__.py", line 18, in <module>
    from . import (  # noqa: F401
  File "/home/nmary/.local/lib/python3.5/site-packages/clodius/cli/aggregate.py", line 204
    print(f"BEDPEDB Version {BED2DDB_VERSION}")
                                             ^
SyntaxError: invalid syntax

Any idea?
Tkanks

@pkerpedjiev
Copy link
Member

Hey, can you try with Python version 3.6 or greater? The problem is the f-strings which were introduced in Python 3.6.

@Nico-FR
Copy link
Author

Nico-FR commented Dec 9, 2020

I tried but:

higlass-manage start

bash: /home/nmary/.local/bin/higlass-manage: No such file or directory

It seems that pip install higlass-manage did not run properly and return:

pip install higlass-manageDefaulting to user installation because normal site-packages is not writeable
Collecting higlass-manage
  Using cached higlass_manage-0.8.0-py3-none-any.whl
Requirement already satisfied: docker in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (4.4.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages(from higlass-manage) (2.9.1)
Requirement already satisfied: pandas>=0.19 in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (1.1.5)
Requirement already satisfied: Click in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (7.1.2)
Collecting clodius>=0.10.3
  Using cached clodius-0.15.4-py2.py3-none-any.whl
Requirement already satisfied: h5py>=3.0.0 in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (3.1.0)
Requirement already satisfied: slugid in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (2.0.0)
Requirement already satisfied: negspy in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (0.2.24)
Requirement already satisfied: sortedcontainers in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (2.3.0)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from clodius>=0.10.3->higlass-manage) (1.11.0)
Requirement already satisfied: pandas>=0.19 in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (1.1.5)
Requirement already satisfied: nose in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (1.3.7)
Requirement already satisfied: Click in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (7.1.2)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages(from higlass-manage) (2.9.1)
Requirement already satisfied: dask in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (2.30.0)
Requirement already satisfied: pybbi>=0.2.0 in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (0.3.0)
Requirement already satisfied: pysam in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (0.16.0.1)
Collecting cooler>=0.8.0
  Using cached cooler-0.8.10-py2.py3-none-any.whl (100 kB)
Requirement already satisfied: asciitree in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (0.3.3)
Requirement already satisfied: simplejson in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (3.17.2)
Requirement already satisfied: h5py>=3.0.0 in /home/nmary/.local/lib/python3.6/site-packages (from clodius>=0.10.3->higlass-manage) (3.1.0)
Requirement already satisfied: pyyaml in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (5.3.1)
Requirement already satisfied: pandas>=0.19 in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (1.1.5)
Requirement already satisfied: Click in /home/nmary/.local/lib/python3.6/site-packages (from higlass-manage) (7.1.2)
Requirement already satisfied: multiprocess in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (0.70.11.1)
Requirement already satisfied: pyfaidx in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (0.5.9.2)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Requirement already satisfied: scipy>=0.16 in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (0.17.0)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from clodius>=0.10.3->higlass-manage) (1.11.0)
Collecting cytoolz<0.11
  Using cached cytoolz-0.10.1.tar.gz (475 kB)
Requirement already satisfied: toolz>=0.8.0 in /home/nmary/.local/lib/python3.6/site-packages (from cytoolz<0.11->cooler>=0.8.0->higlass-manage) (0.11.1)
Requirement already satisfied: pyyaml in /home/nmary/.local/lib/python3.6/site-packages (from cooler>=0.8.0->higlass-manage) (5.3.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Requirement already satisfied: websocket-client>=0.32.0 in /home/nmary/.local/lib/python3.6/site-packages (from docker->higlass-manage) (0.57.0)
Requirement already satisfied: cached-property in /home/nmary/.local/lib/python3.6/site-packages (from h5py>=3.0.0->clodius>=0.10.3->higlass-manage) (1.5.2)
Requirement already satisfied: dill>=0.3.3 in /home/nmary/.local/lib/python3.6/site-packages (from multiprocess->cooler>=0.8.0->higlass-manage) (0.3.3)
Collecting numpy
  Downloading numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 2.7 MB/s
Requirement already satisfied: python-dateutil>=2.7.3 in /home/nmary/.local/lib/python3.6/site-packages (from pandas>=0.19->higlass-manage) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in /home/nmary/.local/lib/python3.6/site-packages (from pandas>=0.19->higlass-manage) (2020.4)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Requirement already satisfied: setuptools>=0.7 in /usr/lib/python3/dist-packages (from pyfaidx->cooler>=0.8.0->higlass-manage) (20.7.0)
Collecting pypairix
  Using cached pypairix-0.3.7.tar.gz (65 kB)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Collecting requests
  Using cached requests-2.25.0-py2.py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cooler>=0.8.0->higlass-manage) (1.10.0)
Building wheels for collected packages: cytoolz, pypairix
  Building wheel for cytoolz (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-81qbrlfz/cytoolz_f01eeffd6c584100b100b9d833ee0216/setup.py'"'"'; __file__='"'"'/tmp/pip-install-81qbrlfz/cytoolz_f01eeffd6c584100b100b9d833ee0216/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w0p9q8e8
       cwd: /tmp/pip-install-81qbrlfz/cytoolz_f01eeffd6c584100b100b9d833ee0216/
  Complete output (55 lines):
  ALERT: Cython not installed.  Building without Cython.
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/utils_test.py -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/_version.py -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz
  creating build/lib.linux-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/operator.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/exceptions.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
  copying cytoolz/utils.pyx -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/dicttoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/functoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/recipes.pyx -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/itertoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/itertoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/utils.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/cpython.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/functoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/__init__.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/recipes.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  copying cytoolz/dicttoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
  creating build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_serialization.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_tlz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_doctests.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_dicttoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_functoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_embedded_sigs.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_none_safe.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_itertoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_curried.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_recipes.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_docstrings.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_utils.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_inspect_args.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
  running build_ext
  building 'cytoolz.dicttoolz' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/cytoolz
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.linux-x86_64-3.6/cytoolz/dicttoolz.o
  cytoolz/dicttoolz.c:17:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cytoolz
  Running setup.py clean for cytoolz
  Building wheel for pypairix (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rvv4gd87
       cwd: /tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/
  Complete output (146 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'pypairix' extension
  creating build
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/bgzf.c -o build/temp.linux-x86_64-3.6/src/bgzf.o
  src/bgzf.c: In function ‘bgzf_block_length’:
  src/bgzf.c:331:27: warning: unused variable ‘remaining’ [-Wunused-variable]
    int count, block_length, remaining;
                             ^
  src/bgzf.c:330:40: warning: unused variable ‘compressed_block’ [-Wunused-variable]
    uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
                                          ^
  src/bgzf.c: In function ‘bgzf_close’:
  src/bgzf.c:456:11: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
    int ret, count, block_length;
             ^
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/bgzip.c -o build/temp.linux-x86_64-3.6/src/bgzip.o
  src/bgzip.c: In function ‘main’:
  src/bgzip.c:198:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
      write(f_dst, buffer, c);
      ^
  src/bgzip.c: In function ‘write_open’:
  src/bgzip.c:57:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
      scanf("%c", &c);
      ^
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/index.c -o build/temp.linux-x86_64-3.6/src/index.o
  src/index.c: In function ‘ti_parse_region2d’:
  src/index.c:864:69: warning: passing argument 1 of ‘ti_get_region_split_character’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           char region_split_character = ti_get_region_split_character(idx);
                                                                       ^
  In file included from src/index.c:11:0:
  src/pairix.h:218:14: note: expected ‘ti_index_t * {aka struct __ti_index_t *}’ but argument is of type ‘const ti_index_t * {aka const struct __ti_index_t *}’
           char ti_get_region_split_character(ti_index_t *idx);
                ^
  src/index.c:878:30: warning: passing argument 1 of ‘ti_get_sc2’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           int dim = ti_get_sc2(idx)+1==0?1:2;
                                ^
  In file included from src/index.c:11:0:
  src/pairix.h:209:13: note: expected ‘ti_index_t * {aka struct __ti_index_t *}’ but argument is of type ‘const ti_index_t * {aka const struct __ti_index_t *}’
           int ti_get_sc2(ti_index_t *idx);
               ^
  src/index.c: In function ‘ti_querys_2d_general’:
  src/index.c:1219:31: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
            char **chrpairlist = ti_seqname(t->idx, &n_seqpair_list);
                                 ^
  src/index.c:1236:59: warning: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type [-Wincompatible-pointer-types]
            sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
                                                             ^
  In file included from src/index.c:11:0:
  src/pairix.h:131:28: note: expected ‘const char **’ but argument is of type ‘char **’
           sequential_iter_t *ti_querys_2d_multi(pairix_t *t, const char **regs, int nRegs);
                              ^
  src/index.c:1242:30: warning: initialization discards ‘const’ qualifierfrom pointer target type [-Wdiscarded-qualifiers]
            *sp=0; char *chr1 = reg;
                                ^
  src/index.c:1246:31: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
            char **chrpairlist = ti_seqname(t->idx, &n_seqpair_list);
                                 ^
  src/index.c:1263:59: warning: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type [-Wincompatible-pointer-types]
            sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
                                                             ^
  In file included from src/index.c:11:0:
  src/pairix.h:131:28: note: expected ‘const char **’ but argument is of type ‘char **’
           sequential_iter_t *ti_querys_2d_multi(pairix_t *t, const char **regs, int nRegs);
                              ^
  src/index.c: In function ‘ti_query_2d_tid’:
  src/index.c:1417:24: warning: return makes integer from pointer withouta cast [-Wint-conversion]
    if (name == 0) return ti_iter_first();
                          ^
  src/index.c: In function ‘create_merged_iter’:
  src/index.c:1469:6: warning: suggest parentheses around assignment usedas truth value [-Wparentheses]
        if( miter->iu = calloc(n,sizeof(iter_unit*))) {
        ^
  src/index.c: In function ‘merged_ti_read’:
  src/index.c:1537:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           miu[i]->s = ti_iter_read(miu[i]->t->fp, miu[i]->iter, miu[i]->len, seqonly);
                     ^
  src/index.c:1543:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         miu[0]->s = ti_iter_read(miu[0]->t->fp, miu[0]->iter, miu[0]->len, seqonly); // get next entry for the flushed iter
                   ^
  src/index.c: In function ‘sequential_ti_read’:
  src/index.c:1573:15: warning: initialization discards ‘const’ qualifierfrom pointer target type [-Wdiscarded-qualifiers]
       char *s = ti_iter_read(siter->t->fp,siter->iter[siter->curr], len,0);
                 ^
  src/index.c:1576:9: warning: assignment discards ‘const’ qualifier frompointer target type [-Wdiscarded-qualifiers]
         s = ti_iter_read(siter->t->fp,siter->iter[siter->curr], len, 0);
           ^
  src/index.c: In function ‘get_unique_merged_seqname’:
  src/index.c:1643:22: warning: assignment from incompatible pointer type[-Wincompatible-pointer-types]
               seqnames = ti_seqname(tbs[i]->idx,&len);
                        ^
  src/index.c: In function ‘flip_region’:
  src/index.c:1744:19: warning: variable ‘split_pos’ set but not used [-Wunused-but-set-variable]
       int l, i, l2, split_pos;
                     ^
  src/index.c: In function ‘querys_2D_wrapper’:
  src/index.c:1911:34: warning: passing argument 1 of ‘flip_region’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           char *reg2 = flip_region(reg, get_region_split_character(tb));
                                    ^
  src/index.c:1743:7: note: expected ‘char *’ but argument is of type ‘const char *’
   char *flip_region ( char* s, char region_split_character) {
         ^
  src/index.c: In function ‘check_triangle’:
  src/index.c:1971:23: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
       char **seqnames = ti_seqname(idx,&len);
                         ^
  src/index.c:1977:64: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             if(ti_get_tid(idx, reg2)!=-1) { free(seqnames); free(reg2); return(0); }  // not a triangle
                                                                  ^
  In file included from src/khash.h:94:0,
                   from src/index.c:4:
  /usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument is of type ‘const char *’
   extern void free (void *__ptr) __THROW;
               ^
  src/index.c:1978:14: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           free(reg2);
                ^
  In file included from src/khash.h:94:0,
                   from src/index.c:4:
  /usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument is of type ‘const char *’
   extern void free (void *__ptr) __THROW;
               ^
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/knetfile.c -o build/temp.linux-x86_64-3.6/src/knetfile.o
  In file included from src/knetfile.c:49:0:
  src/knetfile.c: In function ‘kftp_send_cmd’:
  src/knetfile.h:9:32: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   #define netwrite(fd, ptr, len) write(fd, ptr, len)
                                  ^
  src/knetfile.c:239:2: note: in expansion of macro ‘netwrite’
    netwrite(ftp->ctrl_fd, cmd, strlen(cmd));
    ^
  src/knetfile.c: In function ‘khttp_connect_file’:
  src/knetfile.h:9:32: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   #define netwrite(fd, ptr, len) write(fd, ptr, len)
                                  ^
  src/knetfile.c:418:2: note: in expansion of macro ‘netwrite’
    netwrite(fp->fd, buf, l);
    ^
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/kstring.c -o build/temp.linux-x86_64-3.6/src/kstring.o
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/pairixmodule.c -o build/temp.linux-x86_64-3.6/src/pairixmodule.o
  src/pairixmodule.c:33:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pypairix
  Running setup.py clean for pypairix
Failed to build cytoolz pypairix
Installing collected packages: numpy, urllib3, pypairix, idna, cytoolz, chardet, certifi, requests, cooler, clodius, higlass-manage
    Running setup.py install for pypairix ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6z93ojla/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nmary/.local/include/python3.6m/pypairix
         cwd: /tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/
    Complete output (146 lines):
    running install
    running build
    running build_ext
    building 'pypairix' extension
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/bgzf.c -o build/temp.linux-x86_64-3.6/src/bgzf.o
    src/bgzf.c: In function ‘bgzf_block_length’:
    src/bgzf.c:331:27: warning: unused variable ‘remaining’ [-Wunused-variable]
      int count, block_length, remaining;
                               ^
    src/bgzf.c:330:40: warning: unused variable ‘compressed_block’ [-Wunused-variable]
      uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
                                            ^
    src/bgzf.c: In function ‘bgzf_close’:
    src/bgzf.c:456:11: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
      int ret, count, block_length;
               ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/bgzip.c -o build/temp.linux-x86_64-3.6/src/bgzip.o
    src/bgzip.c: In function ‘main’:
    src/bgzip.c:198:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
        write(f_dst, buffer, c);
        ^
    src/bgzip.c: In function ‘write_open’:
    src/bgzip.c:57:4: warning: ignoring return value of ‘scanf’, declaredwith attribute warn_unused_result [-Wunused-result]
        scanf("%c", &c);
        ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/index.c -o build/temp.linux-x86_64-3.6/src/index.o
    src/index.c: In function ‘ti_parse_region2d’:
    src/index.c:864:69: warning: passing argument 1 of ‘ti_get_region_split_character’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             char region_split_character = ti_get_region_split_character(idx);
                                                                         ^
    In file included from src/index.c:11:0:
    src/pairix.h:218:14: note: expected ‘ti_index_t * {aka struct __ti_index_t *}’ but argument is of type ‘const ti_index_t * {aka const struct __ti_index_t *}’
             char ti_get_region_split_character(ti_index_t *idx);
                  ^
    src/index.c:878:30: warning: passing argument 1 of ‘ti_get_sc2’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             int dim = ti_get_sc2(idx)+1==0?1:2;
                                  ^
    In file included from src/index.c:11:0:
    src/pairix.h:209:13: note: expected ‘ti_index_t * {aka struct __ti_index_t *}’ but argument is of type ‘const ti_index_t * {aka const struct __ti_index_t *}’
             int ti_get_sc2(ti_index_t *idx);
                 ^
    src/index.c: In function ‘ti_querys_2d_general’:
    src/index.c:1219:31: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
              char **chrpairlist = ti_seqname(t->idx, &n_seqpair_list);
                                   ^
    src/index.c:1236:59: warning: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type [-Wincompatible-pointer-types]
              sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
                                                               ^
    In file included from src/index.c:11:0:
    src/pairix.h:131:28: note: expected ‘const char **’ but argument is of type ‘char **’
             sequential_iter_t *ti_querys_2d_multi(pairix_t *t, const char **regs, int nRegs);
                                ^
    src/index.c:1242:30: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
              *sp=0; char *chr1 = reg;
                                  ^
    src/index.c:1246:31: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
              char **chrpairlist = ti_seqname(t->idx, &n_seqpair_list);
                                   ^
    src/index.c:1263:59: warning: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type [-Wincompatible-pointer-types]
              sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
                                                               ^
    In file included from src/index.c:11:0:
    src/pairix.h:131:28: note: expected ‘const char **’ but argument is of type ‘char **’
             sequential_iter_t *ti_querys_2d_multi(pairix_t *t, const char **regs, int nRegs);
                                ^
    src/index.c: In function ‘ti_query_2d_tid’:
    src/index.c:1417:24: warning: return makes integer from pointer without a cast [-Wint-conversion]
      if (name == 0) return ti_iter_first();
                            ^
    src/index.c: In function ‘create_merged_iter’:
    src/index.c:1469:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
          if( miter->iu = calloc(n,sizeof(iter_unit*))) {
          ^
    src/index.c: In function ‘merged_ti_read’:
    src/index.c:1537:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             miu[i]->s = ti_iter_read(miu[i]->t->fp, miu[i]->iter, miu[i]->len, seqonly);
                       ^
    src/index.c:1543:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           miu[0]->s = ti_iter_read(miu[0]->t->fp, miu[0]->iter, miu[0]->len, seqonly); // get next entry for the flushed iter
                     ^
    src/index.c: In function ‘sequential_ti_read’:
    src/index.c:1573:15: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         char *s = ti_iter_read(siter->t->fp,siter->iter[siter->curr], len, 0);
                   ^
    src/index.c:1576:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           s = ti_iter_read(siter->t->fp,siter->iter[siter->curr], len, 0);
             ^
    src/index.c: In function ‘get_unique_merged_seqname’:
    src/index.c:1643:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
                 seqnames = ti_seqname(tbs[i]->idx,&len);
                          ^
    src/index.c: In function ‘flip_region’:
    src/index.c:1744:19: warning: variable ‘split_pos’ set but not used [-Wunused-but-set-variable]
         int l, i, l2, split_pos;
                       ^
    src/index.c: In function ‘querys_2D_wrapper’:
    src/index.c:1911:34: warning: passing argument 1 of ‘flip_region’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             char *reg2 = flip_region(reg, get_region_split_character(tb));
                                      ^
    src/index.c:1743:7: note: expected ‘char *’ but argument is of type ‘const char *’
     char *flip_region ( char* s, char region_split_character) {
           ^
    src/index.c: In function ‘check_triangle’:
    src/index.c:1971:23: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
         char **seqnames = ti_seqname(idx,&len);
                           ^
    src/index.c:1977:64: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
               if(ti_get_tid(idx, reg2)!=-1) { free(seqnames); free(reg2); return(0); }  // not a triangle
                                                                    ^
    In file included from src/khash.h:94:0,
                     from src/index.c:4:
    /usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument isof type ‘const char *’
     extern void free (void *__ptr) __THROW;
                 ^
    src/index.c:1978:14: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             free(reg2);
                  ^
    In file included from src/khash.h:94:0,
                     from src/index.c:4:
    /usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument isof type ‘const char *’
     extern void free (void *__ptr) __THROW;
                 ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/knetfile.c -o build/temp.linux-x86_64-3.6/src/knetfile.o
    In file included from src/knetfile.c:49:0:
    src/knetfile.c: In function ‘kftp_send_cmd’:
    src/knetfile.h:9:32: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     #define netwrite(fd, ptr, len) write(fd, ptr, len)
                                    ^
    src/knetfile.c:239:2: note: in expansion of macro ‘netwrite’
      netwrite(ftp->ctrl_fd, cmd, strlen(cmd));
      ^
    src/knetfile.c: In function ‘khttp_connect_file’:
    src/knetfile.h:9:32: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     #define netwrite(fd, ptr, len) write(fd, ptr, len)
                                    ^
    src/knetfile.c:418:2: note: in expansion of macro ‘netwrite’
      netwrite(fp->fd, buf, l);
      ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/kstring.c -o build/temp.linux-x86_64-3.6/src/kstring.o
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/usr/include/python3.6m -c src/pairixmodule.c -o build/temp.linux-x86_64-3.6/src/pairixmodule.o
    src/pairixmodule.c:33:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-81qbrlfz/pypairix_ceae65e80b4a45e4834558d2a583d2f1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6z93ojla/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nmary/.local/include/python3.6m/pypairix Check the logs for full command output.

@pkerpedjiev
Copy link
Member

Looks like you need to install the Python development libraries: https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

How are you creating your python environments? I've had good success with using conda.

@Nico-FR
Copy link
Author

Nico-FR commented Dec 9, 2020

I am on ubuntu16.04 and I have few python version installed and i can change the default version*:

sudo update-alternatives --config python
There are 4 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.6   4         auto mode
  1            /usr/bin/python2     1         manual mode
  2            /usr/bin/python3     2         manual mode
 3            /usr/bin/python3.5   3         manual mode
* 4            /usr/bin/python3.6   4         manual mode

Sorry I am a rookie and I don't understand what you are asking about python environment. Now I need a dev version of python?

@pkerpedjiev
Copy link
Member

There's a few different ways of managing your python 'environment'. My favorite right now is conda. Maybe you could take a look at this tutorial https://docs.conda.io/en/latest/miniconda.html and set up a conda environment and we can go from there. It should be a matter of doing the following to install miniconda:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod u+x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh

And then the following to create the environment:

conda create -n myenv python=3.7

And finally, to install higlass-manage:

pip install higlass-manage

@Nico-FR
Copy link
Author

Nico-FR commented Dec 9, 2020

Thank you, I learn something.

So I did it with miniconda and I activate "myenv" with python3.7 conda activate myenv but still:

pip install higlass-manage seems ok
higlass-manage start return:

Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1277, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1323, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1272, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1032, in _send_output
    self.send(msg)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 972, in send
    self.connect()
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 756, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/util/retry.py", line 531, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1277, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1323, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1272, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 1032, in _send_output
    self.send(msg)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/http/client.py", line 972, in send
    self.connect()
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/bin/higlass-manage", line 8, in <module>
    sys.exit(cli())
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/start.py", line 150, in start
    redis_port,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/start.py", line 177, in _start
    client = docker.from_env()
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/client.py", line 101, in from_env
    **kwargs_from_env(**kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/docker/api/client.py", line 222, in _retrieve_server_version
    'Error while fetching server API version: {0}'.format(e)
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

@pkerpedjiev-zymergen
Copy link
Contributor

Have you configured Docker to run without sudo access?

Take a look here for an example of how to do so: https://docs.docker.com/engine/install/linux-postinstall/

@Nico-FR
Copy link
Author

Nico-FR commented Dec 10, 2020

Have you configured Docker to run without sudo access?

I did not.

Take a look here for an example of how to do so: https://docs.docker.com/engine/install/linux-postinstall/

Now I can run Docker without sudo access.

./test.sh and higlass-manage view hic-resolutions.cool return the same error:

./test.sh 
travis_fold:start:get-data
get-data
travis_fold:end:get-data
travis_fold:start:ingest
ingest
state True
state True
Aggregating bedfile
delimiter: None
output_file: /tmp/higlass-docker/ctcf_known1_100.bed.beddb header: <map object at 0x7fdc450634d0>
max_per_tile: 50
counter: 0 18
state True
name_text: 
hg_name: default
command: python higlass-server/manage.py ingest_tileset --filename /tmp/ctcf_known1_100.bed.beddb --filetype beddb --datatype bedlike   --coordSystem hg19 --uid QUgCqgdfSGC-DLHw_bikAQ
state True
temp_dir: /tmp/higlass-docker
Inferred filetype: cooler
Inferred datatype: matrix
state True
Inferred datatype: matrix
state True
state True
Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/bin/higlass-manage", line 8, in <module>
    sys.exit(cli())
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/view.py", line 150, in view
    chromsizes_filename=chromsizes_filename,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/ingest.py", line 131, in _ingest
    project_name,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/common.py", line 216, in import_file
    os.link(filepath, to_import_path)
OSError: [Errno 18] Invalid cross-device link: '/home/nmary/tmp.A3Wu71Zaif/test-hg-media/dixon.mcool' -> '/tmp/higlass-docker/dixon.mcool'

@pkerpedjiev
Copy link
Member

Oh, I think that's because your /tmp and /home directories are on different volumes. Could you try this (alter the paths as needed).

higlass-manage stop
higlass-manage start --temp-dir /home/nmary/tmp/higlass-docker
higlass-manage view dixon.mcool

@Nico-FR
Copy link
Author

Nico-FR commented Dec 10, 2020

My /temp directory is indeed /home/nmary/tmp/higlass-docker

Those commands don't change anything:
higlass-manage start --temp-dir /home/nmary/tmp/higlass-docker

Stopping previously running container
Pulling latest image... 
done
Data directory: /home/nmary/hg-data
Temp directory: ()
Starting... default 8989
Docker started: higlass-manage-container-default
sending request 1
Waiting to start (tilesets)...
sending request 2
Waiting to start (tilesets)...
sending request 3
Waiting to start (tilesets)...
sending request 4
Non 200 status code returned (502), waiting...
sending request 5
Non 200 status code returned (502), waiting...
sending request 6
Non 200 status code returned (502), waiting...
sending request 7
Non 200 status code returned (502), waiting...
sending request 8
Non 200 status code returned (502), waiting...
sending request 9
Non 200 status code returned (502), waiting...
sending request 10
Non 200 status code returned (502), waiting...
sending request 11
Non 200 status code returned (502), waiting...
sending request 12
public_data: True
Replaced js file
Started

Should it launch the software, because I don't see anything?

higlass-manage view hic-resolutions.cool

state True
temp_dir: /home/nmary/tmp/higlass-docker
Inferred filetype: cooler
Inferred datatype: matrix
state True
Inferred datatype: matrix
state True
state True
Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/bin/higlass-manage", line 8, in <module>
    sys.exit(cli())
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/view.py", line 150, in view
    chromsizes_filename=chromsizes_filename,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/ingest.py", line 131, in _ingest
    project_name,
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/common.py", line 216, in import_file
    os.link(filepath, to_import_path)
OSError: [Errno 18] Invalid cross-device link: 'hic-resolutions.cool' -> '/home/nmary/tmp/higlass-docker/hic-resolutions.cool'

However datas are on different volume
ls /media/nmary/DONNEES/Abeille/higlass-manage-master/

CHANGELOG         hic-resolutions.cool  PULL_REQUEST_TEMPLATE.md  test.sh
COMMANDS          higlass_manage        README.md
data              LICENSE               requirements.txt
get_test_data.sh  MANIFEST.in           setup.py

ls /media/nmary/DONNEES/Abeille/*coll

hic-resolutions.cool

I think I am missing something obvious for regular user...

@pkerpedjiev
Copy link
Member

Should it launch the software, because I don't see anything?

higlass-manage start starts the server in the background. higlass-manage view should open a browser.

When running higlass-manage start, could you try setting --temp-dir to a directory that's on the same volume as the data you're trying to view (make sure to run higlass-manage stop first)?

@Nico-FR
Copy link
Author

Nico-FR commented Dec 10, 2020

Still the sames exits codes.
If it may help, each time I try to stop the server with higlass-manage stop I have the same result as if the server didn't start:

No Redis instances found at higlass-manage-redis-default; skipping...

@pkerpedjiev
Copy link
Member

The redis error message shouldn't matter. So just to confirm, if you do this:

higlass-manage stop
higlass-manage start --temp-dir /media/nmary/DONNEES/Abeille/higlass-manage-master/tmp
higlass-manage view /media/nmary/DONNEES/Abeille/higlass-manage-master/hic-resolutions.cool

You get the same error?

@Nico-FR
Copy link
Author

Nico-FR commented Dec 10, 2020

Sorry I did not read it properly:

higlass-manage stop
higlass-manage start --temp-dir /media/nmary/DONNEES/Abeille/higlass-manage-master/temp
higlass-manage view /media/nmary/DONNEES/Abeille/higlass-manage-master/hic-resolutions.cool
state True
temp_dir: /media/nmary/DONNEES/Abeille/higlass-manage-master/temp
Inferred filetype: cooler
Inferred datatype: matrix
Traceback (most recent call last):
  File "/home/nmary/miniconda3/envs/myenv/bin/higlass-manage", line 8, in <module>
    sys.exit(cli())
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nmary/miniconda3/envs/myenv/lib/python3.7/site-packages/higlass_manage/view.py", line 157, in view
    from higlass.client import Track, View, ViewConf
ModuleNotFoundError: No module named 'higlass'

@pkerpedjiev
Copy link
Member

Alright! We're making progress :-)

pip install higlass-python

@Nico-FR
Copy link
Author

Nico-FR commented Dec 10, 2020

OMG it works! Thank you so much for your help.

I couldn't have found the solution on my own, it was hard^^
Thanks,
Nicolas

@pkerpedjiev
Copy link
Member

Cool, thank you for your patience and help in getting the issues resolved :-)

@oushujun
Copy link

This solve my issue too. Is higlass-python a required dependency? This critical solution is not written in the readme.

@oushujun
Copy link

Also solved #38

@gubrins
Copy link

gubrins commented Dec 16, 2022

this solver my issue #83 too, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants