Python ModuleNotFoundError:没有名为';pyautogui'-&燃气轮机;在所有IDE中,无论我尝试什么
几个小时以来,我一直在网上寻找解决方案,但都无济于事 我有一段代码:Python ModuleNotFoundError:没有名为';pyautogui'-&燃气轮机;在所有IDE中,无论我尝试什么,python,python-3.x,pip,Python,Python 3.x,Pip,几个小时以来,我一直在网上寻找解决方案,但都无济于事 我有一段代码: #load packages import pyautogui #these are for our clicks and keystrokes! import time #required to call any time commands (i.e delay) #STEP ONE --> Get Cursor Location time.sleep(2) prin t(pyautogui.
#load packages
import pyautogui #these are for our clicks and keystrokes!
import time #required to call any time commands (i.e delay)
#STEP ONE --> Get Cursor Location
time.sleep(2)
prin
t(pyautogui.position())
/usr/bin/python3.9 "/home/silo/Documents/Python Projects/macro 1.py"
Traceback (most recent call last):
File "/home/silo/Documents/Python Projects/macro 1.py", line 2, in <module>
import pyautogui #these are for our clicks and keystrokes!
ModuleNotFoundError: No module named 'pyautogui'
Process finished with exit code 1
但每次尝试运行此脚本时,都会出现以下错误:
#load packages
import pyautogui #these are for our clicks and keystrokes!
import time #required to call any time commands (i.e delay)
#STEP ONE --> Get Cursor Location
time.sleep(2)
prin
t(pyautogui.position())
/usr/bin/python3.9 "/home/silo/Documents/Python Projects/macro 1.py"
Traceback (most recent call last):
File "/home/silo/Documents/Python Projects/macro 1.py", line 2, in <module>
import pyautogui #these are for our clicks and keystrokes!
ModuleNotFoundError: No module named 'pyautogui'
Process finished with exit code 1
/usr/bin/python3.9”/home/silo/Documents/Python Projects/macro 1.py“
回溯(最近一次呼叫最后一次):
文件“/home/silo/Documents/Python Projects/macro 1.py”,第2行,在
导入pyautogui#这些用于我们的点击和按键!
ModuleNotFoundError:没有名为“pyautogui”的模块
进程已完成,退出代码为1
这是我尝试在设置中安装任何软件包时发生的情况:
我当前正在使用:
#load packages
import pyautogui #these are for our clicks and keystrokes!
import time #required to call any time commands (i.e delay)
#STEP ONE --> Get Cursor Location
time.sleep(2)
prin
t(pyautogui.position())
/usr/bin/python3.9 "/home/silo/Documents/Python Projects/macro 1.py"
Traceback (most recent call last):
File "/home/silo/Documents/Python Projects/macro 1.py", line 2, in <module>
import pyautogui #these are for our clicks and keystrokes!
ModuleNotFoundError: No module named 'pyautogui'
Process finished with exit code 1
#load packages
import pyautogui #these are for our clicks and keystrokes!
import time #required to call any time commands (i.e delay)
#STEP ONE --> Get Cursor Location
time.sleep(2)
prin
t(pyautogui.position())
/usr/bin/python3.9 "/home/silo/Documents/Python Projects/macro 1.py"
Traceback (most recent call last):
File "/home/silo/Documents/Python Projects/macro 1.py", line 2, in <module>
import pyautogui #these are for our clicks and keystrokes!
ModuleNotFoundError: No module named 'pyautogui'
Process finished with exit code 1
- 安装pyautogui、pillow、plotly、matplotlib
- 将pyCharm的Python解释器更改为/usr/bin/python3.9(奇怪的是,pyCharm将此路径命名为python3.6)
- 删除了Python 2.7的所有实例
alias='Python 3.9'
export PATH=“$PATH:/PATH/to/dir”
- 使用以下软件安装所有内容:
$python3-m pip