I'm kinda pretty new to python and I wanted to import autogui into PyCharm. So I wrote:
import pyautogui
.
When I try to run the command, I get the message "ModuleNotFoundError: No module named 'pyautogui'".
I looked it up, and everyone said stuff like "just run pip install pyautogui in cmd" or pip3 install pyautogui or similar stuff. But that's not the problem (I think), it is already installed under C:\Python39\Lib\site-packages (I still run it everytime it doesn't work just to be save). The next thing I found was someone being told to go to the settings in PyCharm and add pyautogui as interpreter, but when I try that, it just doesn't show up.
The next thing I tried was clicking on the error in PyCharm and selecting "install package pyautogui", but all I get is this:
"Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pyautogui
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page."
I then used anaconda.org and the anaconda prompt to install pyautogui... again.
But still, it changed nothing. I still don't find anything and it still can't install pyautogui itself with the same error message as above. All I found out is that the anaconda prompt tells me that my python version is 3.8.8 and my command prompt says it's 3.9.6. So I deinstalled 3.9.6 and installed 3.8.8 and reinstalled pyautogui, once with the pip command in cmd and once with the command in the anaconda prompt. Still, nothing works.
And yes, I already added Anaconda to path, because I saw somewhere that it's supposed to help. Well, it doesn't, and now I'm here, asking for help.
Does anybody know what I could be doing wrong?