Hi,
I am running some program in TensorFlow and it gives following error:
(tensorflow) C:\Deepak\tf\2_BasicModels>python linear_regression.py
Traceback (most recent call last):
File "linear_regression.py", line 12, in <module>
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
How to resolve this?
Thanks
Hi,
I was able to resolve issue with following command:
conda install matplotlib
Here is full command and installation log:
(tensorflow) C:\Deepak\tf\2_BasicModels>python linear_regression.py
Traceback (most recent call last):
File "linear_regression.py", line 12, in <module>
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
(tensorflow) C:\Deepak\tf\2_BasicModels>conda install matplotlib
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment C:\Users\User 5\Anaconda3\envs\tensorflow:
The following NEW packages will be INSTALLED:
cycler: 0.10.0-py36h009560c_0
freetype: 2.8-h51f8f2c_1
matplotlib: 2.1.2-py36h016c42a_0
pyparsing: 2.2.0-py36h785a196_1
pyqt: 5.6.0-py36hb5ed885_5
python-dateutil: 2.6.1-py36h509ddcb_1
pytz: 2018.3-py36_0
sip: 4.18.1-py36h9c25514_2
tornado: 4.5.3-py36_0
The following packages will be UPDATED:
libpng: 1.6.28-vc14_2 conda-forge [vc14] --> 1.6.34-h79bbb47_0
libtiff: 4.0.7-vc14_1 conda-forge [vc14] --> 4.0.9-h0f13578_0
opencv: 3.3.0-py36_202 conda-forge --> 3.3.1-py36h20b85fd_1
Proceed ([y]/n)? y
libpng-1.6.34- 100% |###############################| Time: 0:00:00 3.31 MB/s
freetype-2.8-h 100% |###############################| Time: 0:00:00 6.13 MB/s
libtiff-4.0.9- 100% |###############################| Time: 0:00:00 7.35 MB/s
pytz-2018.3-py 100% |###############################| Time: 0:00:00 9.06 MB/s
tornado-4.5.3- 100% |###############################| Time: 0:00:00 9.55 MB/s
opencv-3.3.1-p 100% |###############################| Time: 0:00:08 11.49 MB/s
matplotlib-2.1 100% |###############################| Time: 0:00:00 11.83 MB/s
(tensorflow) C:\Deepak\tf\2_BasicModels>
Thanks