Error in importing boltiot library in PyCharm

ImportError: cannot import name ‘Bolt’ from ‘boltiot’ (C:\Users\LENOVO\PycharmProjects\pythonProject\venv\boltiot.py)

can somebody tell me about this more

Can you tell the output when you run the below in a Terminal/Command Line window?

pip3 show boltiot

exactly this…

Hi @hjain94959,

Are you using python3 or python 2.7 ?

Open the python terminal by typing the below command in terminal.

python3 

then inside python terminal, type

from boltiot import Bolt

Are you able to import other external libraries?

sir it is python 3
and

Use pip3 install boltiot to install and it will work.

Explanation: On systems where both Python2 and Python3 is installed, pip is used to install modules for Python2 and pip3 is for Python3 as you are invoking Python3 interpreter with the command python3 I am assuming that python will invoke Python2 interpreter so pip install boltiot is installing the module for Python2 and ```pip3 install boltiot`` will install the module for Python3.

1 Like

Hi @hjain94959,

Please follow the suggestion given by @aniketsharma00411.

Do let me know in case you need further assistance.

yes it worked well, thanks for the suggestion