Import error on Virtual Box:Cannot import Bolt from boltiot

i have properly followed the installation guide and installed the boltiot module, but still i am getting this error message. Please help me solve this problem.

can you provide screenshot of the file check your code once.
Importing from the wrong module: If the ‘Bolt’ class is not part of the ‘boltiot’ module but is instead located in a different module, you should import it from the correct module. Check the documentation or examples provided by the package to ensure you are importing from the right place.
I hope this resolves your problem

…still getting the same message

Hi @mathew_b210803ee ,

Go through this forum for Virtual Box import error, It might help

Try making a virtual environment and let us know if that solves the problem.
open the terminal and write the following commands:

  1. cd ~
  2. mkdir boltIot
  3. mkdir boltIot/venv
  4. python3 -m venv boltIot/venv
    This will turn the venv directory into virtual environment
  5. cd boltIot
  6. source venv/bin/activate
  7. pip install boltiot.

Screenshot from 2023-07-03 13-49-33

And now inside the virtual environment try to run the python file using
To deactivate virtual environment just write deactivate

same error as before

I tried using the windows cmd, tried virtual env on ubuntu(Virual Box), i am getting the same error in line. I tried reading the documentation, it was also of no real help, guys can you please help me with the first line of code, what change should i make

Hi @mathew_b210803ee,

If you have installed an older version of the ‘boltiot’ package, the ‘Bolt’ class might not be available. Try updating the package to the latest version using the following command:
pip install --upgrade boltiot

It might also be the case where in there is another package named ‘boltiot’ installed in your Python environment that does not contain the ‘Bolt’ class. In this case, you may need to uninstall the conflicting package or use a different name for your own script.

can you tell how to find the conficting package and uninstall it or how to rename the package i installed

Use the following command to uninstall the conflicting package:
pip uninstall boltiot
Also Confirm the uninstallation when it is prompted after the command runs.

Use a different name for your script:
If you have a package named ‘boltiot’ in your Python environment that is causing the conflict, you can rename your script file to something other than ‘’. For example, you can name it ‘’. By using a different name, you ensure that there is no naming conflict with the package.

i am unable to uninstall the boltiot package, what should i do

Hi @mathew_b210803ee ,

In order to give the necessary permissions for uninstalling the package try these steps
On Windows, open the Command Prompt or PowerShell as an administrator. Right-click on the Command Prompt or PowerShell icon and select “Run as administrator”

Use the sudo command to run the uninstallation command with root privileges
sudo pip uninstall boltiot

i am still getting the import error…i tried uninstalling and re-installing the boltiot package
this time the error is showing unknown location, last time a specified location was mentioned in the error.
Kindly look into this and help me resolve the issue. I am not able proceed further in the course due to this issue, any help will be appreciated

is there any way to see all the classes in boltiot package?

Hi @mathew_b210803ee ,

Here is the documentation which you can refer to for the issue you are facing.

Let me know if this helps.

I am also getting the same error again and again and I am unable to proceed .

Hi @2104062,

Can you please elaborate more on your query,
Do provide the necessary screenshots for reference.

I am getting that I can’t open file and No such file or directory as error

Earlier it was showing cannot import bolt from boltiot and now it is showing can’t open file and no such file or directory exists.

I couldn’t find a solution to my problem from this documentation