Giter Club home page Giter Club logo

tic-tac-toe-ai's People

Contributors

ao9000 avatar

Stargazers

 avatar

Watchers

 avatar

tic-tac-toe-ai's Issues

Error while compiling run_game.py with pyinstaller

Description
With the current version of Pyinstaller (3.6), there seems to be an error when trying to run the compiled executable.

Error Message
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tic-tac-toe-ai\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 13, in
import pkg_resources as res
File "c:\programdata\anaconda3\envs\tic-tac-toe-ai\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.dict)
File "site-packages\pkg_resources_init_.py", line 86, in
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[1996] Failed to execute script pyi_rth_pkgres

Understanding the error
There seems to be some package incompatibility with Pyinstaller and setuptools, leading to Pyinstaller not being able to detect that setuptool is installed.

How to reproduce the error
Compiling the script run_game.py will produce the error when attempting to launch the output executable.

# Compiling the game into an executable
pyinstaller run_game.py

# Running this command in cmd will show you the error without closing
run_game.exe

Solution
setuptools 46.0.0 is the culprit for the error, simply downgrade the version to 44.0.0 and re-compile it again will do the trick.

# Check setuptools version
easy_install --version

# Uninstall setuptools
pip uninstall setuptools

# Installing a lower version of setuptools
pip install setuptools==44.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.