Module not found error

Hi, I am running the below code in Jupyter and getting module not found error,



import matplotlib.pyplot as plt

%matplotlib inline

plt.plot(nifty_close)

plt.show()



Through pip list i checked the version of matplotlib, it is 

matplotlib-inline         0.1.6

Kindly suggest how to proceed with this. Is matplotlib-inline different library than matplotlib.pyplot. If yes, then shall I install it?

Can I get a list of libraries and their versions (as it need to be) as per quantra environment? 

Hello Mayuresh,



The matplotlib.pyplot is a module in the matplotlib library that provides a MATLAB-like plotting framework. It is commonly imported using the alias "plt" and is used for creating and customizing plots and visualizations in Python.



On the other hand, "matplotlib-inline" is not a separate library but rather a backend option for displaying matplotlib plots in Jupyter notebooks. When you use "%matplotlib" inline magic command in a Jupyter notebook, it tells Jupyter to display matplotlib plots directly within the notebook interface. This is particularly useful for interactive data analysis and visualization workflows in Jupyter notebooks. So, matplotlib-inline is a configuration option that affects how matplotlib plots are displayed in a Jupyter notebook environment, rather than being a separate library like matplotlib.pyplot.





You can set up a virtual environment which includes all the libraries which are present in the Quantra portal, along with the versions, by going through the blog "Setting Up Python On Your System".



Hope this helps.

Thanks Rekhit for the reply. I have created the virtual environment as per the quantra steps and still got the error. The version of my matplotlib-inline is 0.1.6

kindly confirm if this version is as per the quantra_py environment only?

How to resolve this module not found error, in a basic code which i am running? I am very new to the python hence may require a bit of hand holding. Kindly help.



can i get a list of packages and their versions as per the quantra environment so that i can cross check if anything is mis-matching

Not sure why everytime I am getting error when I am trying to run simple codes (for my practice purpose), as given in the quantra files. For a beginner like me, who just started with Python, this is little overwhelming as I am getting errors in almost all codes and not sure how to proceed further, I am doing things in Quantra-py environment only. Sharing the pic of one such simple code:

Hi Mayuresh,



This was dicsussed and resolved.