Closed eZSnake closed 2 years ago
A direct install attempt through the console results in this:
Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: / Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed
UnsatisfiableError:
I'm finding your original post hard to read. Can you edit it so that it is formatted consistently?
It should now have more consistent formatting
Thanks for editing.
So this is about pre-commit and conda...? Is your pre-commit yaml file minimal? Please strip it down to the minimum possible.
@eZSnake I have a hard time understanding what might go wrong. The installation though pre-commit, and your second post "a direct install" seem to suggest that your conda is somehow unhappy of getting on of the dependencies of latexindent.pl
. What is crucially missing in you post is therefore: on which platform are you working?
To debug, I would suggest that you try to install the dependencies of latexindent.pl
one by one so see which one is the blocker. So please try in an active environment:
conda install -c conda-forge perl
conda install -c conda-forge perl-file-homedir
conda install -c conda-forge perl-yaml-tiny
conda install -c conda-forge latexindent.pl
Furthermore, I would suggest the same as @cmhughes : make a .pre-commit-config.yaml
with only latexindent.pl
to try (and remove everything that is not needed from the post above).
As a work-around you could try to use latexindent.pl
instead of latexindent-conda
in your .pre-commit-config.yaml
I tried creating a new environment in Conda and just installing latexindent as the only package using the conda install commands and it installed perl just fine but I once again got the UnsatisfiableError when trying to install perl-file-homedir
conda install -c conda-forge perl-yaml-tiny Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed
UnsatisfiableError:
The same messages popped up when I tried to install perl-yaml-tiny
It seems that this is really a conda installation issue and not specific to latexindent....?
I came across the following which looks like it had some tips: https://github.com/merenlab/anvio/issues/1145
Your post is inconsistent. What is the first (only?) package of the three dependencies there that does not work? What platform are you working on?
Summary of things we need from you, @eZSnake
Closing for now, let us know if you can provide any further information.
Please provide the following when posting an issue:
original .tex code
I didn't get to testing any .tex files as the install appears to have a problem on my end
yaml settings
Templated used from https://gist.github.com/julian-west/e50b25a9aa10551e3452f5a6cfaa6aa3
To use: pre-commit run -a Or: pre-commit install # (runs every time you commit in git) To update this file: pre-commit autoupdate See https://github.com/pre-commit/pre-commit
repos: Run latexindent.pl (get dependencies using Conda)
Standard hooks
Black, the code formatter, natively supports pre-commit
Sort your imports in a standard form
Upgrade older Python syntax
Changes tabs to spaces
repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.1.13 hooks:
repo: https://gitlab.com/pycqa/flake8 rev: 3.9.2 hooks:
actual/given output
Copy pasted from cmd
An unexpected error has occurred: CalledProcessError: command: ('C:\Users\rehwa\anaconda3\condabin\conda.BAT', 'env', 'create', '-p', 'C:\Users\rehwa\.cache\pre-commit\repo2tqqmb5r\conda-default', '--file', 'environment.yml') return code: 1 expected return code: 0 stdout: Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed Solving environment: ...working... Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed
stderr:
desired or expected output
I want it to have a successful install instead of crashing
anything else
I tried downloading latexindent through Anaconda Navigator but it kept on giving me 'UnsatisfiableError' so I tried it through a command prompt which ended up giving me the same error (error message is pasted above)