I can’t import scipy to my project even though I’ve already installed it

  python, python-3.8, scipy

i want to import scypi on my Project. I´m using Python version 3.8.6. on a Mac and Im working in Visual Studio Code.

Thats my Code:

import numpy
import scipy.special


#neuronal network calss definition 
class neuronalNetwork: 

    #inititalisiere das neuronale Netzwerk 
    def __init__(self, inputNodes, hiddenNodes, outputNodes, learningRate):
        self.inodes = inputNodes 
        self.hnnodes = hiddenNodes
        self.onodes = outputNodes
        self.lr = learningRate

        #Gewichtsmatrizen
        self.wih = (numpy.random.rand(self.hnnodes, self.inodes) - 0.5)
        self.who = (numpy.random.rand(self.hnnodes, self.inodes) - 0.5)

        #Aktionspotenzial-Funktion
        self.activation_function= lambda x: scipy.special.expit(x)
        pass


    #trainiere das neuronale Netzwerk 
    def train():
        pass

    #query das neuronal netzwerk 
    def query():
        pass 

When i try to run it i always get the following error:

Traceback (most recent call last):
  File "neuronalNetwork.py", line 3, in <module>
    import scipy.special
  File "/usr/local/lib/python3.8/site-packages/scipy/__init__.py", line 61, in <module>
    from numpy import show_config as show_numpy_config

I found nothing on the internet to get it working.

Source: Python Questions

LEAVE A COMMENT