vaaaaanquish / xontrib-readable-traceback

xonsh readable traceback
MIT License
11 stars 3 forks source link

Installation fails due to conflicting colorama version #4

Open NeolithEra opened 4 years ago

NeolithEra commented 4 years ago

Hi, users are unable to run Xontrib-readable-traceback due to dependency conflict with colorama package. As shown in the following full dependency graph of Xontrib-readable-traceback, Xontrib-readable-traceback requires colorama>=0.3.7,while backtrace>=1.0.2 requires colorama==0.3.7.

According to pip’s “first found wins” installation strategy, colorama 0.4.3 is the actually installed version. However, colorama 0.4.3 does not satisfy colorama==0.3.7.

Dependency tree-----------

xontrib-readable-traceback - 0.3.2
| +- backtrace(install version:0.2.1 version range:*)
| | +- colorama(install version:0.3.7 version range:==0.3.7)
| +- colorama(install version:0.4.3 version range:>=0.3.7)

Thanks for your help. Best, Neolith

NeolithEra commented 4 years ago

Solution

  1. Loosen the version range of colorama to be <=0.3.7.
  2. Remove your direct dependency colorama, and use the colorama transitively introduced by backtrace.
  3. Ask your direct dependency backtrace to loosen the version range of colorama to be >=0.3.7. @vaaaaanquish Which solution do you prefer, 1 ,2 or 3? Please let me know your choice. May I pull a request to solve this issue?
vaaaaanquish commented 4 years ago

@NeolithEra Thanks. I prefer 2 or 3. The reason is simple, we don't want to lower the version. I think the safest and fast way is 2.

May I pull a request to solve this issue?

Of course you're welcome.

hemna commented 3 years ago

I hit this as well today, making this xontrib not work.

╰─ $ xpip install xontrib-readable-traceback
Requirement already satisfied: xontrib-readable-traceback in /Users/i530566/.pyenv/versions/3.8.7/lib/python3.8/site-packages (0.3.2)
Requirement already satisfied: backtrace in /Users/i530566/.pyenv/versions/3.8.7/lib/python3.8/site-packages (from xontrib-readable-traceback) (0.2.1)
Requirement already satisfied: colorama>=0.3.7 in /Users/i530566/.pyenv/versions/3.8.7/lib/python3.8/site-packages (from xontrib-readable-traceback) (0.4.4)
Collecting colorama>=0.3.7
  Using cached colorama-0.3.7-py2.py3-none-any.whl (19 kB)
Installing collected packages: colorama
  Attempting uninstall: colorama
    Found existing installation: colorama 0.4.4
    Uninstalling colorama-0.4.4:
      Successfully uninstalled colorama-0.4.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
rich 9.12.4 requires colorama<0.5.0,>=0.4.0, but you have colorama 0.3.7 which is incompatible.
╰─ $ xonfig
+------------------+----------------------+
| xonsh            | 0.9.27               |
| Git SHA          | 71fe9014             |
| Commit Date      | Jan 29 08:58:58 2021 |
| Python           | 3.8.7                |
| PLY              | 3.11                 |
| have readline    | True                 |
| prompt toolkit   | 3.0.16               |
| shell type       | prompt_toolkit       |
| pygments         | 2.8.0                |
| on posix         | True                 |
| on linux         | False                |
| on darwin        | True                 |
| on windows       | False                |
| on cygwin        | False                |
| on msys2         | False                |
| is superuser     | False                |
| default encoding | utf-8                |
| xonsh encoding   | utf-8                |
| encoding errors  | surrogateescape      |
| on jupyter       | False                |
| jupyter kernel   | None                 |
| xontrib 1        | abbrevs              |
| xontrib 2        | argcomplete          |
| xontrib 3        | autovox              |
| xontrib 4        | autoxsh              |
| xontrib 5        | avox                 |
| xontrib 6        | avox_poetry          |
| xontrib 7        | back2dir             |
| xontrib 8        | cmd_done             |
| xontrib 9        | commands             |
| xontrib 10       | coreutils            |
| xontrib 11       | direnv               |
| xontrib 12       | docker_tabcomplete   |
| xontrib 13       | fzf-widgets          |
| xontrib 14       | gitinfo              |
| xontrib 15       | histcpy              |
| xontrib 16       | readable-traceback   |
| xontrib 17       | vox                  |
| xontrib 18       | voxapi               |
| xontrib 19       | z                    |
+------------------+----------------------+