Python not finding matplotlib - python

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import matplotlib
ModuleNotFoundError: No module named 'matplotlib'
>>>
I need to create a graph but I'm not sure why python isnt finding matplotlib

I have sometimes encountered this when not referencing the correct sub-library
import matplotlib.pyplot

Related

numpy module is not found although installed but import numpy works

I want to run the python script which imports numpy module.
When I am trying to run, it gives me error as numpy Module not found
C:\BSW_development\bp_plarp\Tools\PicoScope>test_pwm.py
Traceback (most recent call last):
File "C:\BSW_development\bp_plarp\Tools\PicoScope\test_pwm.py", line 24, in <module>
from lib_pico2000a import ScopeCapture
File "C:\BSW_development\bp_plarp\Tools\PicoScope\lib_pico2000a.py", line 20, in <module>
import numpy as np # linspace
ModuleNotFoundError: No module named 'numpy'
although its being installed
C:\BSW_development\bp_plarp\Tools\PicoScope>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'1.19.5'
>>> exit()`

ModuleNotFoundError: No module named '' . in the same folder

I have two python files(qq.py and ww.py) are in the same folder.
code in qq.py is:
print('123x')
code in ww.py is:
import qq
when I execute ww.py in CMD, the error was appered:
Traceback (most recent call last):
File "ww.py", line 1, in <module>
import qq ModuleNotFoundError: No module named 'qq'
I don't know if there are some configuration errors.
It would be great If someone can help me work through this issue.
This is my python version.
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
enter image description here
I have changed the code in ww.py
import os
import sys
sys.path.append(os.getcwd())
import qq
now, ww.py can run well

Python 3: No module named 'AudioSignal'

The code below gives this error when I'm trying to execute it:
>>> import nussl
>>> history = nussl.AudioSignal('HistoryRepeatingPropellerHeads.wav')
Error is:
C:\Users\MyPCUser>python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import nussl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\MyPCUser\AppData\Local\Programs\Python\Python37\lib\site-packages\nussl\__init__.py", line 26, in <modul
e>
from .core.constants import *
File "C:\Users\MyPCUser\AppData\Local\Programs\Python\Python37\lib\site-packages\nussl\core\__init__.py", line 7, in <m
odule>
from audio_signal import AudioSignal
ModuleNotFoundError: No module named 'audio_signal'
>>>
This module does not work yet (23-Feb-2019) with Python 3 according to Issue 135 and Issue 133. From the docs: This package has been tested with python 2.7, but not python 3.x yet. Use python 3 at your own peril!
I got the same issue when trying to use it with Python 3.

no module named matplotlib on windows

Facing this issue right now, saw the question:
no module named pylab on windows
I have annaconda and python 2.7 installed. I tried in the python shell:
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib
and received the following result. I've checked my PATH variable, and I'm not sure how to resolve.
Thanks in advance.

“ImportError: No module named scipy” after installing the scipy package

I need help with the scipy Python module. I installed it, but when I try to import it, I get an error (no module named scipy). Why?
Here's the output from my Python interpreter:
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import scipy
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import scipy
ImportError: No module named scipy

Categories