Recently I was working with some python program analysing a particular stock trend. While trying to run the python code in Spyder I came across an error as below:
In the above screen shot it is complaining about module stocktrends was not found:
ModuleNotFoundError: No module named 'stocktrends'
This is a quick blog about how to quickly install any python module in Anaconda. Spyder comes with Anaconda installation usually. So we will try to find out how to install the above missing module in Anaconda.
The first thing I did was to copy the above error and search in Google. From there you will come across the below link:
In the above screenshot you can see it is telling you to run pip install command to install the module stocktrend. Now, to install the stocktrend module in Ananconda (in a Windows 10 machine), click on the Search box and type Anaconda.
You should see something coming up in the search windows as Anaconda Prompt (Anaconda3) or something similar. Click on it and you should see a similar window as below:
In the above Anaconda Command Prompt type “pip install stocktrends” as below:
As you can see the stocktrend module is now installed in your Anaconda environment.
If you are in a Linux environment you may like to use virtualenv instead. If you like to know how to install and use virtualend in Linux you checkout my previous post How to install virtualenv on Ubuntu 18.04.
This was a very short one, someone very new to anaconda may find it beneficial and handy.