How to install PyAutoGUI

2019-07-13 14:29发布

I am running OS X El Capitan v. 10.11.3

I am trying to install PyAutoGUI

On Terminal, I did the following successfully:

sudo pip3 install pyobjc-core  
sudo pip3 install pyobjc

When I tried running "sudo pip3 install pyautogui" I got the following error in Terminal:

Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-skuvquyu/pyscreeze

I am not sure what to do about this so if anyone has any advice, I would appreciate it.

Thanks

5条回答
劳资没心,怎么记你
2楼-- · 2019-07-13 14:55

i have installed pyautogui on my windows :

  1. I went to my python directory
  2. There shift + right mouse click and open the command prompt
  3. Type "python -m pip install pyautogui" (without quotes)
查看更多
放我归山
3楼-- · 2019-07-13 15:00

Now im using Ubuntu 14.04, but I would try installing the problematic module pyscreeze with:

sudo pip3 install pyscreeze

I personally got another error about missing module called PIL

sudo pip3 install pillow

And then i got some error message about jpeg ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

I hope you'll have more luck.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-07-13 15:03

Found an answer to the problem

On Linux, this is:

sudo pip3 install python3-xlib

sudo apt-get install scrot

sudo apt-get install python3-tk

sudo apt-get install python3-dev

sudo pip3 install pyautogui

ta daaaa :D

查看更多
甜甜的少女心
5楼-- · 2019-07-13 15:17

It seems like there's a problem with pip. Try reinstalling it.

It'd be much better if you installed pyautogui directly from github.

Step 1:

git clone https://github.com/asweigart/pyautogui

Step 2:

cd pyautogui

Step 3:

sudo python3 setup.py install

If python3 doesn't work, try python.

查看更多
疯言疯语
6楼-- · 2019-07-13 15:22

This installation error has most likely been fixed as of version 0.9.34. The module tried to load the PIL/Pillow module during installation.

查看更多
登录 后发表回答