LewisGaul / minegauler

A clone of the original minesweeper game with many added features
GNU General Public License v3.0
11 stars 8 forks source link

No module named mysql #184

Closed deepgandhi closed 2 years ago

deepgandhi commented 2 years ago

Even after installing the requirements, it shows the error.

$ ./run.bat
Traceback (most recent call last):
  File "C:\Users\Deep Gandhi\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\Deep Gandhi\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\Deep Gandhi\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "D:\programs\minegauler\minegauler\__init__.py", line 3, in <module>
    from .core import api
  File "D:\programs\minegauler\minegauler\core\__init__.py", line 13, in <module>
    from . import api, regular, split_cell
  File "D:\programs\minegauler\minegauler\core\api.py", line 20, in <module>
    from ..shared.types import (
  File "D:\programs\minegauler\minegauler\shared\__init__.py", line 19, in <module>
    from . import highscores
  File "D:\programs\minegauler\minegauler\shared\highscores.py", line 29, in <module>
    import mysql.connector
ModuleNotFoundError: No module named 'mysql'

I have manually installed mysql still it shows same error.

LewisGaul commented 2 years ago

Could you paste the output of the following commands for me?

where python
python --version
python -m pip list

What was the command you used to install the requirements? Sometimes pip install -r requirements.txt installs into the wrong environment - it's generally safer to do python -m pip install -r requirements.txt, maybe if you try that it will fix the issue?

The name of the package is mysql-connector-python, so installing 'mysql' won't fix the issue.

Btw when I merge https://github.com/LewisGaul/minegauler/pull/176 this requirement will be removed for running the app.

deepgandhi commented 2 years ago

Thanks, it now works fine. and sorry to bother you.