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:

Module not found error in Spyder

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:

https://pypi.org/project/stocktrends/

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.

Search window in Widows 10

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:

Anaconda Command Prompt

In the above Anaconda Command Prompt type “pip install stocktrends” as below:

Installing stocktrend module in Anaconda

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.