I am trying to convert a Python 3 script I wrote to an executable to run both on Windows and Linux. (Not sure if this is relavent but the script is dependent on another code I've written). I installed pyinstaller on WSL 1 (Windows 11) and have entered the directory which my script is in. When I run pyinstaller myScript.py
I get the following errer:
ImportError: cannot import name 'six' from 'pkg_resources.extern' (/usr/lib/python3/dist-packages/pkg_resources/extern/__init__.py)
Based on a solution I saw on to another problem on Stack Overflow, I tried pacman -S python-six
but that came with its own set of issues. Any ideas how to fix this? Should I try a different method altogether. Also again not sure if this is relavent or not: The version of Python I use is Python 3.12.1 but also have Python 3.8.10.
So what fixed the issue for me was running PyInstaller through CMD rather than the command line. I believe this is because at the end of the day WSL is still on Windows.