Question: I am trying to run a python code in Spyder but I keep getting the error message: ModuleNotFoundError: No module named 'numpy' How to fix

I am trying to run a python code in Spyder but I keep getting the error message:

ModuleNotFoundError: No module named 'numpy'

How to fix that problem?

I am trying to run a python code in Spyder but I

Spyder (Python 3.7) X File Edit Search Source Run Debug Consoles Projects Tools View Help ...of Queensland\\SCIE2100 - Introduction to Bioinformatics\\Practicals\\Practical1 \\Practical1 \\sequence.py Console 1/A X sequence.py/A X sequence.py X webservice.py X sym.py X prob.py X stats.py X In [3]: runfile('C: /Users/iande/Desktop/The University of 2 W Module *** sequence *** Queens Land/SCIE2100 - Introduction to Bioinformatics/ Practicals/Practical1/Practical1/sequence . py') 4 UT This module depends on the following modules Traceback (most recent call last) : 6 sym -- defines an alphabet File "C: \\Users\\iande\\Desktop\\The University of 7 prob -- defines structures to hold probabilities (prob also depends on sym) Queensland\\SCIE2100 - Introduction to Bioinformatics 8 webservice -- collection of functions for accessing the EBI REST web services \\Practicals \\Practical1\\Practical1\\sequence. py", line 23, 9 in 10 sym, prob and webservice should be in the same directory as this module so it can function import numpy 11 12 This module incorporates classes for ModuleNotFoundError: No module named ' numpy' 13 14 Sequence -- names and defines a sequence of symbols; computes various transformations and pairwise alignme 15 Alignment -- defines a multiple sequence alignment; computes stats for use in substitution matrices In [4] : | 16 Substhatrix -- substitution matrix class to support alignment methods 17 18 Incorporates methods for Loading and saving files relevant to the above (e. g. FASTA, ALN, substitution mat 19 and methods for retrieving relevant data from web services 20 21 A 22 import string, sys, re, math, os, array A 23 import numpy A 24 from webservice import * A 25 A from sym import * 26 from prob import * 27 28 # Sequence 29 301 class Sequence (object) : 31 . """ A biological sequence. Stores the sequence itself (as a compact array), 32 information. the alphabet (i. e. , type of sequence it is), and optionally a name and further 33 18 11 11 34 35 sequence = None # The array of symbols that make up the sequence 36 alphabet = None # The alphabet from which symbols come conda: base (Python 3.7.1) Line 23, Col 13 ASCII LF RW Mem 90%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!