shawngmc / game-extraction-toolbox

Python tools for extracting ROMs from games and investigating files
MIT License
66 stars 7 forks source link

requirement python-magic-bin >= 0.4.14 #48

Closed shobobon closed 1 year ago

shobobon commented 1 year ago
$ pipx install game-extraction-toolbox
Fatal error from pip prevented installation. Full pip output in file:

pip seemed to fail to build package:
    python-magic

Some possibly relevant errors from pip install:
    ERROR: Cannot install game-extraction-toolbox==0.0.11, game-extraction-toolbox==0.0.13, game-extraction-toolbox==0.0.14, game-extraction-toolbox==0.0.15, game-extraction-toolbox==0.0.16, game-extraction-toolbox==0.0.18, game-extraction-toolbox==0.0.19, game-extraction-toolbox==0.0.20, game-extraction-toolbox==0.0.21, game-extraction-toolbox==0.0.22, game-extraction-toolbox==0.1.0, game-extraction-toolbox==0.1.1, game-extraction-toolbox==0.1.3, game-extraction-toolbox==0.1.4 and game-extraction-toolbox==0.1.5 because these package versions have conflicting dependencies.
    ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Error installing game-extraction-toolbox.

pyproject.toml

'python-magic-bin >= 0.4.14',

Cannot be installed. Please remove from requirement.

Ubuntu 20.04.5 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64) WSL

shawngmc commented 1 year ago

Unfortunately, it's not as simple as just dropping a dependency. In this case, python-magic-bin is providing a platform-relevant version of libmagic for file identification.

I've installed the same Ubuntu 20.04.5 LTS WSL, and I'm able to reproduce the error. I've made a change to limit the lib to windows, but that alone doesn't fix it.

Looking at both your message and a full log, it's trying to install EVERY version of gex on PyPi. It looks like this is related to a pip bug in the version of pip bundled with that version of ubuntu.

If you update pip via: python3 -m pip install -U pip You should get an updated version of pip. After that, gex installs normally with pipx.

If you get a chance, can you give that a try?

shobobon commented 1 year ago
$ python3 -m pip install -U pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./.local/lib/python3.11/site-packages (22.3.1)
Collecting pip
  Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 10.7 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed pip-23.0.1

$ pipx install game-extraction-toolbox
⚠️  File exists at /home/usr/.local/bin/gextoolbox and points to /home/usr/.local/bin/gextoolbox, not
    /home/usr/.local/pipx/venvs/game-extraction-toolbox/bin/gextoolbox. Not modifying.
  installed package game-extraction-toolbox 0.1.6, installed using Python 3.11.0
    - gextoolbox (symlink missing or pointing to unexpected location)
done! ✨ 🌟 ✨
$ gextoolbox
Usage: gextoolbox [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  archive      Tools for working with various types of archives
  file         Generic file operations
  finder       Search operations
  postprocess  Cleanup Processing for Various Rip Types

The installation was successfully completed! I didn't think it was a PIP bug.

Thank you and well noted on your advise. I'm truly appreciate it.