如何在 Windows 10 上的 python3 64 位上安装 PyAutoGui?

How to install PyAutoGui on python3 64 bit on Windows 10?

我试过:

pip install pyautogui

#output:

  File "<stdin>", line 1
pip install pyautogui
          ^
SyntaxError: invalid syntax

我试过了

C:\Python34\pip.exe install pyautogui

#output:

  File "<stdin>", line 1
C:\Python34\pip.exe install pyautogui
                                    ^
SyntaxError: unexpected character after line continuation character

None 其中有效。同样,我在 Windows 10,我有 python 3,python 是 64 位而不是 32 位。

您尝试使用的 pip 不是 python 包或 built-in functionpipPython 的包管理系统。 python3 发行版应该已经预装了 pip

在命令行中使用pip命令。 运行 pip -h 将为您快速说明您可以使用哪些命令。见下图:

如果您可以在命令行中复制上面的图像,则表示您已经安装了 pip,可以继续 运行 $ pip install pyautogui.

如果你得到的是:

-bash: pip: command not found

这意味着你需要先install pip

使用 anaconda 安装:

  • 从其网站下载 anaconda
  • 然后输入 pip install pyautogui 在 anaconda 命令提示符下

希望对您有所帮助。

python -m pip install pyautogui

您可以在 https://docs.anaconda.com/anaconda/install/

下载 conda
conda install -c conda-forge pyautogui

conda install -c conda-forge/label/cf201901 pyautogui 

conda install -c conda-forge/label/cf202003 pyautogui

或 pip 安装 pyautogui

进入cmd。它适用于 python 3.8.

pip3 install pyautogui