Cannot install PyAutoGUI - python

I tried installing PyAutoGUI-0.9.35 but the following came up when running cmd in the same folder:
my input: pip install PyAutoGUI-0.9.35
output:
Collecting PyAutoGUI-0.9.35
Could not find a version that satisfies the requirement PyAutoGUI-0.9.35 (from versions: )
No matching distribution found for PyAutoGUI-0.9.35
I then tried running the setup.py file from PyAutoGUI folder, but this showed up this time:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [opts2_opts]...]
or: setyp.py --help [cmd1 cmd2...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
the window immediately shut down so I had to take a quick screenshot
could anyone please tell me what I'm doing wrong? I run python 3.6, the required version for pyautogui is 3.4, I also run Win 10.

Try:
pip install pyautogui==0.9.35
Here's what happened when I did in a cmd session:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\System32>pip install PyAutoGUI-0.9.35
Collecting PyAutoGUI-0.9.35
Could not find a version that satisfies the requirement PyAutoGUI-0.9.35 (from
versions: )
No matching distribution found for PyAutoGUI-0.9.35
C:\Windows\System32>pip install pyautogui==0.9.35
Collecting pyautogui==0.9.35
Downloading PyAutoGUI-0.9.35.zip (57kB)
100% |################################| 61kB 223kB/s
Collecting pymsgbox (from pyautogui==0.9.35)
Downloading PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui==0.9.35)
Downloading PyTweening-1.0.3.zip
Requirement already satisfied: Pillow in c:\python35\lib\site-packages (from pya
utogui==0.9.35)
Collecting pyscreeze (from pyautogui==0.9.35)
Downloading PyScreeze-0.1.9.tar.gz
Requirement already satisfied: olefile in c:\python35\lib\site-packages (from Pi
llow->pyautogui==0.9.35)
Building wheels for collected packages: pyautogui, pymsgbox, PyTweening, pyscree
ze
Running setup.py bdist_wheel for pyautogui ... done
Stored in directory: C:\Users\me\AppData\Local\pip\Cache\wheels\28\
3b\07\64bee61ca73d56260a47d6b49692e7f217a69568aae2117167
Running setup.py bdist_wheel for pymsgbox ... done
Stored in directory: C:\Users\me\AppData\Local\pip\Cache\wheels\c1\
cb\86\c3c2e3c39f9f0d015cf0f94ab6ca41e14f8c2083846e82b91d
Running setup.py bdist_wheel for PyTweening ... done
Stored in directory: C:\Users\me\AppData\Local\pip\Cache\wheels\04\
86\59\70a93cd378740b5266c51e11c36ee3fc8b9dfef4b3bc72fd82
Running setup.py bdist_wheel for pyscreeze ... done
Stored in directory: C:\Users\me\AppData\Local\pip\Cache\wheels\6a\
f7\db\9521ae30a53499f6c9024df5f5a605d56b6e6ad0c2d48dcb42
Successfully built pyautogui pymsgbox PyTweening pyscreeze
Installing collected packages: pymsgbox, PyTweening, pyscreeze, pyautogui
Successfully installed PyTweening-1.0.3 pyautogui-0.9.35 pymsgbox-1.0.6 pyscreez
e-0.1.9
C:\Windows\System32>

1. Method
If your Python is not updated, then update your Python, then install pyaudiogui.
2. Method
pip install pyautogui==0.9.35

Related

ERROR: Failed building wheel for pymsgbox

Collecting PyAutoGUI
Using cached PyAutoGUI-0.9.53-py3-none-any.whl
Collecting python3-Xlib
Using cached python3_xlib-0.15-py3-none-any.whl
Collecting mouseinfo
Using cached MouseInfo-0.1.3-py3-none-any.whl
Collecting pyscreeze>=0.1.21
Using cached PyScreeze-0.1.28.tar.gz (25 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pygetwindow>=0.0.5
Using cached PyGetWindow-0.0.9-py3-none-any.whl
Collecting pymsgbox
Using cached PyMsgBox-1.0.9.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyTweening>=1.0.1
Using cached pytweening-1.0.4-py3-none-any.whl
Collecting pyrect
Using cached PyRect-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: pyperclip in /usr/lib/python3/dist-packages (from mouseinfo->PyAutoGUI) (1.8.2)
Building wheels for collected packages: pyscreeze, pymsgbox
Building wheel for pyscreeze (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyscreeze (pyproject.toml) did not run successfully.
File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
_inject_headers(name, scheme)
File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
File "/usr/lib/python3.10/_distutils_system_mod.py", line 135, in wrapped_load_schemes
schemes = _load_schemes()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 103, in _load_schemes
sysconfig_schemes = _load_sysconfig_schemes() or {}
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 91, in _load_sysconfig_schemes
with contextlib.suppress(AttributeError):
RecursionError: maximum recursion depth exceeded
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pymsgbox
Failed to build pyscreeze pymsgbox
ERROR: Could not build wheels for pyscreeze, pymsgbox, which is required to install pyproject.toml-based projects
I got the same error on my Kali Linux while installing pyautogui. It happens when you have an apt installation pending or when installation fails or some other apt-get error. To fix this just run
sudo apt --fix-broken install
sudo apt-get update
Now try installing pyautogui again...
A quick workaround would be to work on a venv:
python -m venv .venv source .venv/bin/activate pip install ...
which works for me.
python -m venv .venv source .venv/bin/activate pip install....
apt install python3.10-venv

As a pip install user, am I supposed to have wheel installed?

Consider the usual scenario - I want to create a virtual environment and install some packages. Say
python3 -m venv venv
source venv/bin/activate
pip install databricks-cli
During the installation, I get an error
Building wheels for collected packages: databricks-cli
Building wheel for databricks-cli (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/paulius/Documents/wheeltest/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-maxix98x
cwd: /tmp/pip-install-m7jmyh1m/databricks-cli/
Complete output (8 lines):
/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py:24: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for databricks-cli
While it is benign (the installation actually works), it is still annoying.
I know that pip install wheel resolves this, but wheel does not come with the virtual environment by default. So should I always add it to my requirements.txt, or maybe this is something that can be solved by the package maintainer (in this case databricks-cli) and hence I should open an issue in their Github?
Update: note that the wheel is not necessary to install wheels, in this example bunch of dependencies get successfully downloaded and installed as wheels. The only databricks-cli package gets the error, as it does not have a wheel, but for some reason, pip tries to build it.
Update 3:
To prevent it from the maintainer's perspective use:
setup_requires=["wheel"]
it looks like you're on Linux and using the pre-installed or otherwise modified Python and its setuptools.
I've experienced the same thing due to Debian cutting off parts of the packages in not quite a sane way and I have mainly had issues with the prebuilt python-setuptools and likes. Check if the version matches and if not, install setuptools from pip, that might help in the future.
I have setuptools 45.2.0 and had no issues installing the package as a wheel. Then I uninstalled wheel and dropped the cache dir and it installed it properly even from the tar.gz source.
Update 2:
It might or might not be resolved by requiring wheel package. If the setup.py expects bdist_wheel to be present prior to the installation (most likely), adding it to the setup() function will not help and a manual check for the package within the setup script (+ perhaps a reference in README) are necessary so an end-user can install it properly.
For example if it's not present on the system, just print a warning and call an exit(). That would be the least a maintainer should do.
Update:
Yes, in the case where you encounter bdist_wheel command missing you need to install wheel with pip instal wheel.
It's not required, but it's recommended. Pip will work just fine without wheels, but you'll be installing from source (tar.gz, .zip or .egg).
See the packaging discussion for whether to use wheel or egg (or source).
This was a pip bug, and the solution is to upgrade the pip. With the newest version things look fine:
(venv) paulius#xps:~/Documents/wheeltest$ pip install databricks-cli
Collecting databricks-cli
Using cached databricks-cli-0.14.3.tar.gz (54 kB)
Collecting click>=6.7
Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting requests>=2.17.3
Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting six>=1.10.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting tabulate>=0.7.7
Using cached tabulate-0.8.9-py3-none-any.whl (25 kB)
Collecting idna<4,>=2.5
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.1-py3-none-any.whl (35 kB)
Using legacy 'setup.py install' for databricks-cli, since package 'wheel' is not installed.
Installing collected packages: urllib3, idna, charset-normalizer, certifi, tabulate, six, requests, click, databricks-cli
Running setup.py install for databricks-cli ... done
Successfully installed certifi-2021.5.30 charset-normalizer-2.0.1 click-8.0.1 databricks-cli-0.14.3 idna-3.2 requests-2.26.0 six-1.16.0 tabulate-0.8.9 urllib3-1.26.6
Note the Using legacy 'setup.py install' ... line.
This is a related issue in the pip github https://github.com/pypa/pip/issues/8302. Not exactly that, but there is an explanation in the comments on what's the wheel building logic supposed to by.

how to install geoviews in python?

i was trying to install geoviews using pip but got errors.
C:\Users\jainil>pip install geoviews==1.6.2
Collecting geoviews==1.6.2
Using cached https://files.pythonhosted.org/packages/5d/76/7aa62a5dfdec25ab9f921223bd26507bb603bc5f08a4a7057d3f5e24f42b/geoviews-1.6.2-py2.py3-none-any.whl
Requirement already satisfied: numpy>=1.0 in c:\users\jainil\anaconda3\lib\site-packages (from geoviews==1.6.2) (1.16.4)
Requirement already satisfied: holoviews>=1.11.1 in c:\users\jainil\anaconda3\lib\site-packages (from geoviews==1.6.2) (1.12.3)
Requirement already satisfied: bokeh>=1.0.0 in c:\users\jainil\anaconda3\lib\site-packages (from geoviews==1.6.2) (1.2.0)
Collecting cartopy>=0.16.0 (from geoviews==1.6.2)
Using cached https://files.pythonhosted.org/packages/e5/92/fe8838fa8158931906dfc4f16c5c1436b3dd2daf83592645b179581403ad/Cartopy-0.17.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Complete output from command 'C:\Users\jainil\Anaconda3\python.exe' 'C:\Users\jainil\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\jainil\AppData\Local\Temp\tmp25d9ovmd':
ERROR: setup.py:171: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
'.'.join(str(v) for v in GEOS_MIN_VERSION), ))
Proj 4.9.0 must be installed.
----------------------------------------
ERROR: Command "'C:\Users\jainil\Anaconda3\python.exe' 'C:\Users\jainil\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\jainil\AppData\Local\Temp\tmp25d9ovmd'" failed with error code 1 in C:\Users\jainil\AppData\Local\Temp\pip-install-sjcurctz\cartopy
ok it is solved.
solved by conda install -c scitools cartopy

Can't install Flask-Enterprise for python 3.6 on Ubuntu 18.04

I have an Ubuntu 18.04 operating system with two versions of python installed; 3.6 and 2.7. I tried to install Flask-Enterprise for python 3.6 and I got:
zeinab#ZiZi:~/PycharmProjects/My_Service$ sudo pip3 install Flask-Enterprise
The directory '/home/zeinab/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/zeinab/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Flask-Enterprise
Downloading https://files.pythonhosted.org/packages/a7/8d/635300aaae97541c8734b83acb4534cbfd879fcf2e2d3f31ced4c3524274/Flask-Enterprise-1.0.tar.gz (78kB)
100% |████████████████████████████████| 81kB 359kB/s
Requirement already satisfied: Flask>=0.3 in /usr/local/lib/python3.6/dist-packages (from Flask-Enterprise)
Collecting soaplib (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/b9/96/44957abd425b50e69848e43ab2c472839390038e3ede611346110b83a2da/soaplib-1.0.0.tar.gz
Collecting suds (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/bc/d6/960acce47ee6f096345fe5a7d9be7708135fd1d0713571836f073efc7393/suds-0.4.tar.gz (104kB)
100% |████████████████████████████████| 112kB 940kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-7fa4v00d/suds/setup.py", line 20, in <module>
import suds
File "/tmp/pip-build-7fa4v00d/suds/suds/__init__.py", line 154, in <module>
import client
ModuleNotFoundError: No module named 'client'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7fa4v00d/suds/
But when I install it for python 2.7, everything works fine:
zeinab#ZiZi:~/PycharmProjects/My_Service$ sudo pip2 install Flask-Enterprise
The directory '/home/zeinab/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/zeinab/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Flask-Enterprise
Downloading https://files.pythonhosted.org/packages/a7/8d/635300aaae97541c8734b83acb4534cbfd879fcf2e2d3f31ced4c3524274/Flask-Enterprise-1.0.tar.gz (78kB)
100% |████████████████████████████████| 81kB 379kB/s
Requirement already satisfied: Flask>=0.3 in /usr/local/lib/python2.7/dist-packages (from Flask-Enterprise)
Collecting soaplib (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/b9/96/44957abd425b50e69848e43ab2c472839390038e3ede611346110b83a2da/soaplib-1.0.0.tar.gz
Collecting suds (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/bc/d6/960acce47ee6f096345fe5a7d9be7708135fd1d0713571836f073efc7393/suds-0.4.tar.gz (104kB)
100% |████████████████████████████████| 112kB 941kB/s
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.3->Flask-Enterprise)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.3->Flask-Enterprise)
Requirement already satisfied: Jinja2>=2.10 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.3->Flask-Enterprise)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.3->Flask-Enterprise)
Requirement already satisfied: lxml>=2.2.1 in /usr/local/lib/python2.7/dist-packages (from soaplib->Flask-Enterprise)
Collecting pytz (from soaplib->Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
100% |████████████████████████████████| 512kB 1.0MB/s
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.10->Flask>=0.3->Flask-Enterprise)
Installing collected packages: pytz, soaplib, suds, Flask-Enterprise
Running setup.py install for soaplib ... done
Running setup.py install for suds ... done
Running setup.py install for Flask-Enterprise ... done
Successfully installed Flask-Enterprise-1.0 pytz-2018.9 soaplib-1.0.0 suds-0.4
I found this answer and I installed suds-jurko as an alternative for suds, then tried to install Flask-Enterprise again; I got the same error.
EDIT 1:
I tried to install it in a virtual environment, but I got identical results:
zeinab#Snapp:~$ virtualenv -p python3 testenv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/zeinab/testenv/bin/python3
Also creating executable in /home/zeinab/testenv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
zeinab#Snapp:~$ source testenv/bin/activate
(testenv) zeinab#Snapp:~$ pip3 install Flask-Enterprise
Collecting Flask-Enterprise
Downloading https://files.pythonhosted.org/packages/a7/8d/635300aaae97541c8734b83acb4534cbfd879fcf2e2d3f31ced4c3524274/Flask-Enterprise-1.0.tar.gz (78kB)
100% |████████████████████████████████| 81kB 407kB/s
Collecting Flask>=0.3 (from Flask-Enterprise)
Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting soaplib (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/b9/96/44957abd425b50e69848e43ab2c472839390038e3ede611346110b83a2da/soaplib-1.0.0.tar.gz
Collecting suds (from Flask-Enterprise)
Downloading https://files.pythonhosted.org/packages/bc/d6/960acce47ee6f096345fe5a7d9be7708135fd1d0713571836f073efc7393/suds-0.4.tar.gz (104kB)
100% |████████████████████████████████| 112kB 1.1MB/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-8am_aqio/suds/setup.py", line 20, in <module>
import suds
File "/tmp/pip-install-8am_aqio/suds/suds/__init__.py", line 154, in <module>
import client
ModuleNotFoundError: No module named 'client'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-8am_aqio/suds/
create a virtual environment by using virtualenv or pipenv.
simply run:
virtualenv -p python3 envname
use this newly created python3 environment as your project interpreter/environment.
open terminal and run following command to activate your environment:
source envname/bin/activate
now install Flask-Enterprise in this virtualenv by using:
pip3 install Flask-Enterprise

Error creating pytheapp for Ethereum on OSX

I am trying to install pyethapp on OSX but get an error right at the end ""python setup.py egg_info"". Any suggestions?
c233:json-server-api justinstaines$ pip install pyethapp
Collecting pyethapp
Downloading pyethapp-1.3.0-py2.py3-none-any.whl (334kB)
100% |████████████████████████████████| 337kB 1.2MB/s
Collecting statistics (from pyethapp)........
Collecting secp256k1 (from ethereum>=1.3.5->pyethapp)
Downloading secp256k1-0.12.1.tar.gz (144kB)
100% |████████████████████████████████| 153kB 2.3MB/s
Complete output from command python setup.py egg_info:
Your setuptools version (1.1.6) is too old to correctly install this package. Please upgrade to a newer version (>= 3.3).
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/rb/ydgvprfj6yg5q180740g1lpm0000gn/T/pip-build-KDbJvF/secp256k1/
Doh just realised
Your setuptools version (1.1.6) is too old to correctly install this package. Please upgrade to a newer version (>= 3.3).

Categories

Resources