Install Numpy?

Please post any questions about developing your plugin here. Please use the search function before posting!
AncientOnes
Junior Member
Posts: 4
Joined: Thu Jul 13, 2023 6:33 pm

Install Numpy?

Postby AncientOnes » Wed Jul 26, 2023 1:02 am

I've been able to install some packages based on the command gathered from [here][https://sourcepython.com/viewtopic.php?f=20&t=2190&p=13644&hilit=pip&sid=e47e99ce62a3bb7938c860934feb9433#p13643]

Code: Select all

python3 -m pip install --no-cache-dir --target tf/addons/source-python/packages/site-packages/ PACKAGE


As a test, I was successfully able to install discord.py as a test, and

Code: Select all

import discord
print(discord.__version__)

worked perfectly.

However, importing numpy, or packages that depend on numpy, leads to the following error:

Code: Select all

[Source.Python]
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "../addons/source-python/packages/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "../addons/source-python/packages/site-packages/numpy/core/overrides.py", line 7, 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 "../addons/source-python/packages/source-python/plugins/command.py", line 164, in load_plugin
    plugin = self.manager.load(plugin_name)
  File "../addons/source-python/packages/source-python/plugins/manager.py", line 184, in load
    spec = find_spec(plugin.import_name)
  File "../addons/source-python/plugins/overseer/__init__.py", line 1, in <module>
    from .overseer import Reeee
  File "../addons/source-python/plugins/overseer/overseer.py", line 20, in <module>
    import numpy as np
  File "../addons/source-python/packages/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "../addons/source-python/packages/site-packages/numpy/core/__init__.py", line 48, 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.6 from "../addons/source-python/Python3/plat-linux/libpython3.6m.so.1.0"
  * The NumPy version is: "1.19.5"

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'


I am eventually trying to install tensorflow, but one step at a time :)
User avatar
Articha
Member
Posts: 32
Joined: Tue Sep 21, 2021 12:13 pm
Location: Russia

Re: Install Numpy?

Postby Articha » Wed Jul 26, 2023 10:07 am

Old numpy, I think. Try to install numpy on python 3.6 by yourself and copy package into Source.Python
Alvyn
Junior Member
Posts: 1
Joined: Wed Aug 16, 2023 4:24 am

Re: Install Numpy?

Postby Alvyn » Wed Aug 16, 2023 8:12 am

Hello !

This error might be related to how numpy was installed or your setup. Make sure to check the provided troubleshooting tips and the documentation mentioned in the error message for further guidance. Taking things step by step is a good approach, and once you resolve the numpy issue, you can proceed towards installing tensorflow. Good luck!
My website about PDFsmart

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 13 guests