ModuleNotFoundError: No module named 'magic' (Fedora/Linux)
Hello I have an issue where I get this anytime I try to use any command(linux):
raceback (most recent call last):
File "/home/jo/.local/bin/gextoolbox", line 5, in <module>
from gex.toolbox import cli
File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/toolbox.py", line 5, in <module>
from gex.commands.archive.archive import archive
File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/archive.py", line 3, in <module>
from .arc.arc import arc
File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/arc/arc.py", line 3, in <module>
from .extract import extract
File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/arc/extract.py", line 6, in <module>
from gex.lib.file import identify
File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/lib/file/identify.py", line 4, in <module>
import magic
ModuleNotFoundError: No module named 'magic'
even though python3-magic is installed! Can someone help me pls?
tried it with python 3.11 too after seeing that I had 3.12 installed but got the same result:
getting the same on opensuse tumbleweed.
I'm getting this too (running in ubuntu under WSL)
Can confirm that I'm getting this error on Arch with Python 3.12.4.
Same issue on Pop!_OS 22.04 LTS with Python 3.10.12
When I get a chance, I may see about just dropping the file identification entirely. It's a nice idea, but portable libmagic is just a pain in the butt.
On Wed, Jul 17, 2024 at 9:31 PM gcspino @.***> wrote:
Same issue on Pop!_OS 22.04 LTS with Python 3.10.12
— Reply to this email directly, view it on GitHub https://github.com/shawngmc/game-extraction-toolbox/issues/77#issuecomment-2235053963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYAQQ6PBZ7UN3BXHIPNOELZM4LGRAVCNFSM6AAAAABKMDHZG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZVGA2TGOJWGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Shawn McNaughton Application Developer, NextPoint Group http://www.nextpointgroup.com/ @.*** @.***>
Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.
Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.
My workaround was to use Windows.
Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.
My workaround was to use Windows.
That's a solution I gotta say, but it's not solution to the actual problem
Hold on a sec, @shawngmc the magic that you use is python3 not 2 right? Just to make sure
It seems like the symlink of python doesn't detect magic but the real python does, I'm going to investigate
Found a solution @shawngmc , please enable system site package on linux venv.
To fix this, edit pyvenv.cfg file on ~/.local/pipx/venvs/game-extraction-toolbox/pyvenv.cfg and set include-system-site-packages to true.