I installed pyautogui module on python3 (only python ver. I have installed on my pc), but for some reason visual studio is not detecting it. I import it the following way: "import pyautogui"
I tried reinstalling it etc, but nothing helped.
I installed pyautogui module on python3 (only python ver. I have installed on my pc), but for some reason visual studio is not detecting it. I import it the following way: "import pyautogui"
I tried reinstalling it etc, but nothing helped.
Check if there is no more python version.
Press Ctrl + Shift + P to open a new command pallete.
Find Jupyter: Select Interpreter to start Jupyter server
Pick your python version.
If you are working with Visual Studio Code and import any library, you will face this error: "unresolved import". To resolve this error, In your workspace settings, you can set your Python path like the following.
{
"python.defaultInterpreterPath": "/path/to/your/venv/bin/python",
}
It looks like the python environment which you have installed the pyautogui
was not the python environment you have selected in the VSCode.
You can get where you have installed the pyautogui
through pip show pyautogui
.
You can click the python interpreter version on the bottom-left of the VSCode to switch your python interpreter or reinstall the pyautogui
in the selected environment.
After you select the environment in the VSCode, you can open a new terminal in the VSCode through Ctrl+Shift+`. The Python extension will help you activate the environment in the terminal and the package will be installed into the selected python environment.
Not sure is anyone still having this issue, but i corrected it by installing the phyautogui module by using 'pip install pyautogui' on win cmd.
just run it and will be automatically recognized by visual studio.
Remember that you need phyton path installed on windows in order to run pip on cmd