No module named boltiot

I have logged into server using putty , when i run the python file"temp_sys.py" error occurs as "no module named boltiot.

You have to install the library modules before using them in your program.
Use the commands
sudo apt-get -y update
sudo apt install python3-pip
sudo pip3 install boltiot
After successful completion, you can use your python code.

1 Like

Install the library modules before using them in your program.
Commands to be used

sudo apt-get -y update
sudo apt-get install python3-pip
sudo pip3 install boltiot
1 Like

First you have to install the library modules using the code given below

sudo apt-get -y update
sudo apt install python3-pip
sudo pip3 install boltiot

After installing the library modules you can carry on with your further code.

1 Like

I had received the same error while i ran the program.
Make sure that when you run the program you run it using the below command
sudo python3 temp_sys.py
I had simply typed in python instead of python3 and hence the error.

To make it short, it means that you lacked some “dependencies” for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python “family”.

The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that python path to your sys.path list. In your notebook, first try:

import sys
sys.path.append('my/path/to/module/folder')

This isn’t a permanent change in sys.path, because when you log out, your environment is reset, so any variables you may have set are lost.

The better (and more permanent) way to solve this is to set your PYTHONPATH, which provides the interpreter with additional directories look in for python packages/modules.

from BASH type: export PYTHONPATH=/path/to/new/folder:/another/path/...../

#each path must be separated by a colon