ModuleNotFoundError: No module named 'matplotlib' Windows

Ads
Ads

ModuleNotFoundError: No module named 'matplotlib' Windows


Java Coder
ModuleNotFoundError: No module named 'matplotlib' Windows
1 Answer(s)      3 months and 29 days ago
Posted in : Big Data
Ads

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

View Answers

February 22, 2018 at 7:33 PM


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


Ads









Related Tutorials/Questions & Answers:
ImportError: No module named scipy.ndimage - Solved
ImportError: No module named scipy.ndimage - Solved  Hi, How to solve following error: ImportError: No module named scipy.ndimage This error..., in <module> import scipy.ndimage as ndi ImportError: No module named
Hibernate named queries
Hibernate named queries  Hi, What is named queries in Hibernate? Thanks
Advertisements
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
Design a class named account
Design a class named account  The class contains: § An int data field named id for the account (default 0). § A double data field named balance for the account (default 0.0) § A double data field named annualInterestRate
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate?   You can put all the HQL into the XML mapping file rather than putting the sql queries to various places in between code. sample.hbm.xml <
Hibernate Named Query
This section contain description of named query with example
windows username - JSP-Servlet
windows username  how to reset the password and username of windows using jsp
create named class - Java Beginners
create named class  Can you check my [email protected]: How to create a class named Employee with name and salary. Make a class Manager inherit from Employee with an instance field named department. Supply a method toString
Running Jar file in Windows
Running Jar file in Windows  Running Jar file in Windows
Windows File Protection
Windows File Protection  I would like to know if there is any way to place a file or folder under windows protection such that it can't be deleted, or in generel if there is a way to prevent a file or folder from being deleted
MongoDB uninstall windows service
MongoDB uninstall windows service  Hi, Previously I installed... from windows service. Can any one tell me How to uninstall the MongoDB from windows server? Thanks   Hi, You can remove the MongoBD service using
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
windows authentication with hibernate - Hibernate
windows authentication with hibernate  Does anyone know how to setup a datasource for SQL Server that uses Windows authentication instead of SQL Server mixed mood authentication? Is it possible with hibernate framwork? Thanks
links open new windows
links open new windows  Why do my links open new windows rather than update an existing frame
JPA setParameter (Named Parameter)
JPA setParameter (Named Parameter)   ... API's method setParameter as a named parameter. JPA Query API's supports two types of setParameter.  1. Named Parameters  2. Numbered Parameters
Hibernate Named HQL in Annotation
In this section, you will learn how to execute Named HQL written in Model class Annotation
wifi et windows
wifi et windows  est ce qu'on peut capturer les trames d'un reseau wifi sous windows?? et merci pour la reponse
Admin Module
Admin Module The admin have the privilege  to add the question, delete the question. He is responsible for maintaining the site. He can also search the question paper by question Id and by title. The Admin does the following
Windows 7 refresh DNS
Windows 7 refresh DNS  Windows 7 refresh DNS How to refresh DNS in Window 7/Windows and linux? Thanks   Hi, In windows it is very easy to refresh the DNS. go to the command prompt (dos prompt) and then issue
creating windows service - RMI
creating windows service  Hi, I have created a project using spring RMI and have some server.jar file which contians all the classes of server and server.exe file which is used to start the server. But I want to create a windows
Windows Web Hosting
Windows Web Hosting Windows Web Hosting is the hosting service provided on the Microsoft Windows Operating Systems. IIS server is used to serve the web pages on the windows platform. Windows platform provides the tools for developing
Running Java Applications as a Windows Service
Running Java Applications as a Windows Service  sample code for "Run a Java application as a Windows Service
Version of com.fmpwizard>lift-named-comet_2.8.1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.8.1 dependency
Version of com.fmpwizard>lift-named-comet_2.8.2 dependency
List of Version of com.fmpwizard>lift-named-comet_2.8.2 dependency
Version of com.fmpwizard>lift-named-comet_2.9.0-1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.9.0-1 dependency
Version of com.fmpwizard>lift-named-comet_2.9.1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.9.1 dependency
Regarding 2 windows
Regarding 2 windows  Hi, I want 2 separate windows,when i click on a 1st window submit btn then it will show 2nd window. In 2nd window i want 1 textbox.i entered some text on that text box and when i close the 2nd window
User Module
User Module The user first need to make registration on the website for appearing in the online examination. After the making successful registration he is eligible for online test examination. To appear in the examination he need