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

Problem with installation #23

Open
MartinLaforest opened this issue Jan 10, 2022 · 5 comments
Open

Problem with installation #23

MartinLaforest opened this issue Jan 10, 2022 · 5 comments

Comments

@MartinLaforest
Copy link

MartinLaforest commented Jan 10, 2022

Hello,

What is the recommenended set up for installation? I have tried to install HiCAssembler in a conda environment with HiCExplorer installed but get this error message:

ERROR: Command errored out with exit status 1:
 command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g6Q8Gc/pyfaidx/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g6Q8Gc/pyfaidx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-5H6vn8
     cwd: /tmp/pip-install-g6Q8Gc/pyfaidx/
Complete output (52 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-g6Q8Gc/pyfaidx/setup.py", line 37, in <module>
    "Topic :: Scientific/Engineering :: Bio-Informatics"
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 774, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 698, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 724, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 909, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1163, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 44, in _execfile
    code = compile(script, filename, 'exec')
  File "/tmp/easy_install-DBXRLE/setuptools_scm-6.3.2/setup.py", line 22
    f"{type(self).__name__} is forbidden, "
                                          ^
SyntaxError: invalid syntax
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Thank you

@grpiccoli
Copy link

grpiccoli commented Feb 13, 2023

The only solution that worked for me was:

  1. Create custom conda (I used mamba because it didn't work with conda for me)
    mamba env create -f hca_py3.yml
  • This will create the env on the folder you are currently in, modify the yml or use flags for other options
  • I changed the extension to "txt" so I could upload the file here
  • I had SAMtools 1.15.1 preinstalled compiled with GCC 11.3 and Java 1.8.0_144
  1. Check out 2to3 branch (credits Python 3 #16)
    git clone https://github.com/maxplanck-ie/HiCAssembler.git cd HiCAssembler/ git checkout -b 2to3 --track origin/2to3

  2. Fix old references (credits ImportError: No module named HiCMatrix  #21)
    And More old references (credits Assemble pipeline crashes on iteration 0, "Graph object has no attribute 'node'" #20, object of type 'int' has no len() in Scaffolds.py _remove_weakest len(path)  #8 )
    sed -i -e 's/import hicexplorer.HiCMatrix/import hicmatrix.HiCMatrix/' -e 's/G\.node/G.nodes/' -e '0,/^def / s/^/def connected_component_subgraphs(G):\n\tfor c in nx.connected_components(G):\n\t\tyield G.subgraph(c)\n&/' -e 's/nx\.connected_component_subgraphs/connected_component_subgraphs/g' hicassembler/*py -e -e '0,/path\s*\=\s*len\(self\.pg\_base\[node\]\)/ s/path\s*\=\s*len\(self\.pg\_base\[node\]\)/path = self.pg_base[node]/' hicassembler/test/*.py

hca_py3.yml.txt

@juliadouglasf
Copy link

@grpiccoli, your .yml file gave me the same error that I get when trying to pip install hicassembler by itself: error in HiCAssembler setup command: "values of 'package_data' dict" must be a list of strings (got '*.txt')

@juliadouglasf
Copy link

Actually, I got LibMambaUnsatisfiableError: Encountered problems while solving: - package hicexplorer-3.7.3-pyhdfd78af_0 requires fit_nbinom >=1.2, but none of the providers can be installed. Trying to pip install hicasembler=1.1.1 on top of the other software packages afterwards gave me the HiCAssembler setup command error

@grpiccoli
Copy link

@juliadouglasf did you change the extension of the yml.txt to just yml ? that would be the first step.
The second issue looks as if you are not using the yaml attached, which should try to install hicexplorer 3.7.2 instead of 3.7.3
Let me know how it goes from there, Cheers

@juliadouglasf
Copy link

My apologies; I copied over the wrong error. The attempt to install hicexplorer 3.7.3 was separate. The error I received first was
Pip subprocess error: ERROR: Could not find a version that satisfies the requirement hicassembler==1.1.1+8.g9a95f26.dirty (from versions: 1.1, 1.1.1) ERROR: No matching distribution found for hicassembler==1.1.1+8.g9a95f26.dirty. The yaml file extension is just .yml.

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

3 participants