Unable to install pyautogui - python

I'm trying to install Pyautogui on ubuntu 18.04, but I keep receiving the following error message:
$pip3 install pyautogui
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/45/70/c5d340fadb06106135b7fe9677fc6d275f3cd7f7e6f896316c4cfe6c022c/PyAutoGUI-0.9.37.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Collecting Pillow (from pyautogui)
Using cached https://files.pythonhosted.org/packages/d1/24/f53ff6b61b3d728b90934bddb4f03f8ab584a7f49299bf3bde56e2952612/Pillow-5.2.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyscreeze (from pyautogui)
Using cached https://files.pythonhosted.org/packages/c9/6e/e175fda37d76d7846a6cda8a4364dfd7c2d343139b0716c4f03194d14933/PyScreeze-0.1.17.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-6aakksn1/pyscreeze/setup.py", line 10, in <module>
with open("README.md", "r") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6aakksn1/pyscreeze/
Can someone help me please?

PyScreeze maintainer here. This is caused by a packaging error, which has been fixed in 0.1.18. It should work now if you install pyautogui, though you may have to delete the pip cache on your machine first.

The new release (v0.1.17) of pyscreeze fails to install as a dependency of pyautogui.
As a workaround try to install first the last working version of pyscreeze and after this pyautogui:
pip install pyscreeze<=0.1.14
pip install PyAutoGUI
I already created a new ticket for this issue https://github.com/asweigart/pyscreeze/issues/37

Related

installing pyinstaller on python 3.4.3

I'm trying to install pyinstaller 3.5 in python 3.4.3 but i get this error:
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-_dyh3r_g\pefile\
The command i use is this:
pip install pyinstaller==3.5
I'm using the latest version that 3.4.3 can use of pip, setuptools and wheel.
pip 19.1.1
setuptools 43.0.0
wheel 0.33.6
I appreciate all the help.
this is the full log:
pip install pyinstaller=="3.5"
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pyinstaller==3.5
Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pywin32-ctypes>=0.2.0 (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/9e/4b/3ab2720f1fa4b4bc924ef1932b842edf10007e4547ea8157b0b9fc78599a/pywin32_ctypes-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\python34\lib\site-packages (from pyinstaller==3.5) (43.0.0)
Collecting altgraph (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/ee/3d/bfca21174b162f6ce674953f1b7a640c1498357fa6184776029557c25399/altgraph-0.17-py2.py3-none-any.whl
Collecting pefile>=2017.8.1 (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/f9/1e/fc4fac0169d16a98577809400bbcfac8ad1900fa792184327b360ea51fc6/pefile-2021.5.13.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\setup.py", line 86, in <module>
long_description = "\n".join(_read_doc().split('\n')),
File "C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\setup.py", line 33, in _read_doc
tree = ast.parse(f.read())
File "c:\python34\lib\ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 3789
f'Export directory contains more than 10 repeated entries '
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\
pefile (one of the PyInstaller dependencies) requires python >= 3.6.0
Try pip install pyinstaller This should work
or
If you wanted the specific version you can do that by
pip install pyinstaller == "3.5"

pip could not resolve dependencies in requirement.txt

My requirments.txt read
Cython
pot
I run pip install -r requirement.txt
Collecting Cython (from -r requirements.txt (line 30))
Downloading https://files.pythonhosted.org/packages/e7/bd/59054534d09830394470c14e4dd4a2e8fa64ac14559095a044208bf34c18/Cython-0.29.7-cp35-cp35m-manylinux1_x86_64.whl (2.0MB)
100% |################################| 2.0MB 17.7MB/s
Collecting pot (from -r requirements.txt (line 31))
Downloading https://files.pythonhosted.org/packages/28/4b/7aaa1f840a359f5953dd378e0237fa8faf9b0a415ff7282b7375fbe68d27/POT-0.5.1.tar.gz (720kB)
100% |################################| 727kB 17.3MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-5w30dx4k/pot/setup.py", line 7, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
It seems that Cython is just downloaded rather than installed, so pot still has an installation failure. When I first install Cython mannually then pot using pip, it works.
Any solutions to resolve this dependencies automatically?
I am using Ubuntu 18.04 with python3 AND i do not want to use conda.

Unable to install pyautogui through pip install with error1

I'm trying to install pyautogui through code 'pip install pyautogui'
But the program always give me an error like following
I started Visual Studio Code with Administration Authority
=========================================================================================
(.venv) C:\Users\USer\Desktop\pythoncode>pip install pyautogui
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/19/ef/438d80abd396fd2d124bd37c07c765f913723c54197c4c809d85c8ff5a43/PyAutoGUI-0.9.41.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Requirement already satisfied: Pillow in c:\users\user\desktop\pythoncode\.venv\lib\site-packages (from pyautogui) (5.4.1)
Collecting pyscreeze (from pyautogui)
Using cached https://files.pythonhosted.org/packages/f3/27/073bf07400943e38b06ba40def60ec489d114fd7356c2db5a2f793454312/PyScreeze-0.1.19.tar.gz
Collecting pygetwindow (from pyautogui)
Using cached https://files.pythonhosted.org/packages/01/ed/56d4a369c6e18f6b239d9ef37b3222ba308bfebf949571b2611ff7d64f1d/PyGetWindow-0.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\setup.py", line 11, in <module>
long_description = fh.read()
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 903: illegal multibyte sequence
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\
=========================================================================================
I use 32bit windows and 32bit python 3.7
I already upgrade my pip with code pip install --upgrade pip.(current version is 19.0.2 now)
And I have tried a prompt with administration authority and type pip install pyautogui but Prompt also gave me the same error :
Command "python seup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-e2r19eza\pygetwindow\
I already try the solution that the follwing link suggets but I failed
"pip install unroll": "python setup.py egg_info" failed with error code 1
I failed to do easy_install -U setuptools with an error:
WinError 5] Access is denied : 'c:\\users\\user\\desktop\\pythoncode\\.venv\\Scripts\\easy_install.exe'
Please share your wisdom to the beginner
Try to install as an Administrator.
pip install pyautogui

pip install channels:"python setup.py egg_info" failed with error code 1

(some_virtual_env) # pip install channels
gives me:
Collecting channels
Using cached channels-2.0.2-py2.py3-none-any.whl
Collecting Django>=1.11 (from channels)
Using cached Django-1.11.10-py2.py3-none-any.whl
Collecting asgiref~=2.1 (from channels)
Using cached asgiref-2.1.5-py2.py3-none-any.whl
Collecting daphne~=2.0 (from channels)
Using cached daphne-2.0.3-py2.py3-none-any.whl
Requirement already satisfied: pytz in /root/.virtualenvs/codebench/lib/python2.7/site-packages (from Django>=1.11->channels)
Collecting async-timeout~=2.0 (from asgiref~=2.1->channels)
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iii9a6/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iii9a6/async-timeout/
I tried upgrade setuptools as described in: https://stackoverflow.com/a/36025294/646732
It didn't work.
Tried:
(test_python3) # apt-get install python3
(test_python3) # alias python=python3
(test_python3) # pip install async-timeout
(test_python3) # python -V
Python 3.5.2
(test_python3) # pip install async-timeout
It gives me:
Collecting async-timeout
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Dw6FjJ/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Dw6FjJ/async-timeout/
Not sure what else to check and install.
Run below command first
sudo pip install pathlib
then
pip install channels

Pip installer error

I am trying to install PyAutoGUI but every time i try i get the error message
C:\WINDOWS\system32>C:\Users\nicho\AppData\Local\Programs\Python\Python35-32\Scripts\pip install PyAutoGUI
Collecting PyAutoGUI
Using cached PyAutoGUI-0.9.33.zip
Collecting pymsgbox (from PyAutoGUI)
Using cached PyMsgBox-1.0.3.zip
Collecting PyTweening>=1.0.1 (from PyAutoGUI)
Using cached PyTweening-1.0.3.zip
Collecting Pillow (from PyAutoGUI)
Using cached Pillow-3.1.1-cp35-none-win32.whl
Collecting pyscreeze (from PyAutoGUI)
Using cached PyScreeze-0.1.8.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze\setup.py", line 6, in <module>
version=__import__('pyscreeze').__version__,
File "c:\users\nicho\appdata\local\temp\pip-build-jt08_ns2\pyscreeze\pyscreeze\__init__.py", line 21, in <module>
from PIL import Image
ImportError: No module named 'PIL'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze
Can anyone help me?
You should install the Python Image Library(PIL), using the command:
sudo pip install PIL --allow-external PIL --allow-unverified PIL
Check out the virtual environment for python packages. It is really user friendly in pycharm for example and you can test out packages before using up hard drive space.

Categories

Resources