Detergent13 / tft-bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 11!
GNU Affero General Public License v3.0
81 stars 45 forks source link

ImportError: numpy.core.multiarray failed to import #82

Closed nicolaspaillard closed 2 years ago

nicolaspaillard commented 2 years ago

Precisely followed your instructions, got that error. Here is the full traceback :

Traceback (most recent call last):
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\__init__.py", line 23, in <module>
    from . import multiarray
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\multiarray.py", line 10, in <module>
    from . import overrides
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\overrides.py", line 6, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\__init__.py", line 144, in <module>
    from . import core
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\__init__.py", line 49, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from "C:\UserPrograms\Dev\Python\python.exe"
  * The NumPy version is: "1.22.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

Traceback (most recent call last):
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\__init__.py", line 23, in <module>
    from . import multiarray
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\multiarray.py", line 10, in <module>
    from . import overrides
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\overrides.py", line 6, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\__init__.py", line 144, in <module>
    from . import core
  File "C:\UserPrograms\Dev\Python\lib\site-packages\numpy\core\__init__.py", line 49, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from "C:\UserPrograms\Dev\Python\python.exe"
  * The NumPy version is: "1.22.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

Traceback (most recent call last):
  File "C:\UserData\Desktop\tft-bot-main\tft.py", line 6, in <module>
    from python_imagesearch.imagesearch import imagesearch as search
  File "C:\UserPrograms\Dev\Python\lib\site-packages\python_imagesearch\imagesearch.py", line 1, in <module>
    import cv2
  File "C:\UserPrograms\Dev\Python\lib\site-packages\cv2\__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: numpy.core.multiarray failed to import
nicolaspaillard commented 2 years ago

Checked all my versions and it seems OK :

C:\Windows\system32>python -V
Python 3.8.3

C:\Windows\system32>pip show opencv-python
Name: opencv-python
Version: 4.5.1.48
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/skvark/opencv-python
Author:
Author-email:
License: MIT
Location: c:\userprograms\dev\python\lib\site-packages
Requires: numpy
Required-by: python-imageseach-drov0, python-imagesearch, python-imagesearch-drov0

C:\Windows\system32>pip show PyAutoGUI
Name: PyAutoGUI
Version: 0.9.50
Summary: PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks. For Windows, macOS, and Linux, on Python 3 and 2.
Home-page: https://github.com/asweigart/pyautogui
Author: Al Sweigart
Author-email: al@inventwithpython.com
License: BSD
Location: c:\userprograms\dev\python\lib\site-packages
Requires: mouseinfo, pygetwindow, pymsgbox, pyscreeze, PyTweening
Required-by: python-imageseach-drov0, python-imagesearch, python-imagesearch-drov0

C:\Windows\system32>pip show python-imageseach-drov0
Name: python-imageseach-drov0
Version: 1.0.6
Summary: A wrapper around openCv to perform image searching
Home-page: https://github.com/drov0/python-imagesearch
Author: Martin Lees
Author-email: drov.fr@protonmail.com
License: UNKNOWN
Location: c:\userprograms\dev\python\lib\site-packages
Requires: numpy, opencv-python, pyautogui, python3-xlib
Required-by:

C:\Windows\system32>pip show printy
Name: printy
Version: 2.0.1
Summary: Colorize the print statement by global or inline flags
Home-page: https://github.com/edraobdu/printy
Author: Edgardo Obregón
Author-email: edraobdu@gmail.com
License: MIT
Location: c:\userprograms\dev\python\lib\site-packages
Requires:
Required-by:
Detergent13 commented 2 years ago

Respectfully, this is an issue with your versions or installations, it has nothing to do with my code.

I would recommend deleting your modules folder and reinstalling everything, but I can't help debug a ton past that!