I am trying to use the installed python modules that I have installed through pip
. By still it is giving me the import error.
For example, I have installed selenium
using pip install selenium
and trying to import it in my program then it in one of my programs but it is generating error AttributeError: partially initialized module 'selenium' has no attribute '__version__' (most likely due to a circular import)
. But when running the same code in the interactive mode it's working (you can also confirm from this image.) While running the same code in script mode it is outputing as this. So, kindly help me to get out of it.
My console output stating modules are installed and python version
Note: I have just taken selenium
as an example module but all of the installed modules are behaving in the same manner.
I am using:
Windows 11
Python Version: 3.11.1
Sample Code that I am trying to run:
import selenium
print(selenium.__version__)
Thanks in advance