Game2Text icon indicating copy to clipboard operation
Game2Text copied to clipboard

Error when trying to build from source

Open poteau opened this issue 3 years ago • 1 comments

OS: Windows 10 Python version: 3.7.4

To replicate:

  1. Install Python 3.7.4 (Windows x86-64 executable installer) from https://www.python.org/downloads/release/python-374/
  2. Clone the current main branch version (19c1fa370c55564ba8dd489e46cd567a2d688ff0)
  3. Open cmd.exe as a regular user
  4. python -m pip install --upgrade pip
  5. pip install virtualenv
  6. cd Game2Text/
  7. virtualenv venv --python=python3.7.4
  8. cd venv/Scripts/
  9. activate.bat
  10. cd ../../
  11. pip install -r requirements.txt

I get an error on this last step when it tries to install pyinstaller==4.1

ModuleNotFoundError: No module named 'PyInstaller.main'; 'PyInstaller' is not a package

I've tried using Powershell and tried the bundled version of pip (19.0.3), same error. I also tried following the steps under "Extra Packages for Windows Development" and then reran the command, same error. Specifying various other versions of PyInstaller in requirements.txt also did not work, some different errors usually occur.

Is this just a strange dependency issue or am I doing something wrong?

poteau avatar Jul 29 '22 06:07 poteau

Specifying pyinstaller==4.10 in requirements.txt seemed to fix it. It runs from cmd with the command python game2text.py just fine, and build.bat seems to produce a working .exe in the dist folder.

The problem appears to be related to this: https://github.com/pyinstaller/pyinstaller/issues/6704.

poteau avatar Jul 29 '22 08:07 poteau