How to solve this error of downloading pyautogui library? - python

It's throwing errors while trying to install Python pyautogui module. Anyone knows why it throws an error?
C:\Users\Mtronics>pip install pyautogui==0.9.35
Collecting pyautogui==0.9.35
Downloading PyAutoGUI-0.9.35.zip (57 kB)
|████████████████████████████████| 57 kB 415 kB/s
Collecting pymsgbox
Using cached PyMsgBox-1.0.8.tar.gz (18 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mtronics\appdata\local\programs\python\python38-32\python.exe' 'c:\users\mtronics\appdata\local\programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Mtronics\AppData\Local\Temp\pip-build-env-pvhbyby8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (14 lines):
Traceback (most recent call last):
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\site-packages\pip\__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\cli\main.py", line 5, in <module>
import locale
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\locale.py", line 16, in <module>
import re
File "c:\users\mtronics\appdata\local\programs\python\python38-32\lib\re.py", line 145, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mtronics\appdata\local\programs\python\python38-32\python.exe' 'c:\users\mtronics\appdata\local\programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Mtronics\AppData\Local\Temp\pip-build-env-pvhbyby8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

It is because you have a non standard enum module installed. It used to work before Python 3.6 but is no longer compatible with the standard libary.
Run this command to uninstall it and then try again:
pip uninstall -y enum34

Related

Error installing any libraries in paycharm

After calling the "pip install" command of any library, an error occurs:
ERROR: Command errored out with exit status 2:
command: 'c:\users\roman\appdata\local\programs\python\python38\python.exe' 'c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip' install -
-ignore-installed --no-user --prefix 'C:\Users\roman\AppData\Local\Temp\pip-build-env-2tu6fau4\overlay' --no-warn-script-location --no-binary :none: --only-binary :no
ne: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (24 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-67.0.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: setuptools, wheel
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 216, in _main
status = self.run(options, args)
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
return func(self, options, args)
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\commands\install.py", line 412, in run
installed = install_given_reqs(
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\req\__init__.py", line 82, in install_given_reqs
requirement.install(
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\req\req_install.py", line 778, in install
scheme = get_scheme(
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\locations.py", line 185, in get_scheme
scheme = distutils_scheme(
File "c:\users\roman\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\locations.py", line 118, in distutils_scheme
assert not (home and prefix), "home={} prefix={}".format(home, prefix)
AssertionError: home=C:\Users\roman\AppData\Local\Temp\pip-target-tdo35poo prefix=C:\Users\roman\AppData\Local\Temp\pip-build-env-2tu6fau4\overlay
WARNING: You are using pip version 20.2.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\users\roman\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 2: 'c:\users\roman\appdata\local\programs\python\python38\python.exe' 'c:\users\roman\appdata\local\programs\python\python
38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\roman\AppData\Local\Temp\pip-build-env-2tu6fau4\overlay' --no-warn-script-location -
-no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.`
Important nuances:
I have a new project in paycharm without modules.
Pure Python 3.9
pip (python 3.8).
I am not an admin in Windows 10 system.
I correctly added Python 3.9 to the system path.
Installing libraries through the interpreter settings also gives the same error
I reinstalled python and paycharm
I tried writing pip3 and --no-user
Upon googling the error assert not (home and prefix), we can find this pypa/pip issue where someone has solved this by making sure their pip.conf doesn't have a target line.
You should make sure your pip configuration files don't have extraneous cruft left over in them and/or that nothing has set a PIP_TARGET environment variable or similar.

Pycaret Installation errors out with pyLDAvis

I am installing Pycaret==2.2.1 and getting the below error.
Collecting pyLDAvis (from pycaret==2.2.1)
Using cached https://files.pythonhosted.org/packages/03/a5/15a0da6b0150b8b68610cc78af80364a80a9a4c8b6dd5ee549b8989d4b60/pyLDAvis-3.3.1.tar.gz
Installing build dependencies ... error
Complete output from command C:\Users\mm\Anaconda3\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\mm\AppData\Local\Temp\pip-build-env-1gfpkcpv --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools:
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/3b/02/8d4d27b1cacaac2d129a27d17a22d92a2a5eedcb7817d4ed8ab0d4daf5c4/setuptools-60.9.3-py3-none-any.whl
Installing collected packages: setuptools
Exception:
Traceback (most recent call last):
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
status = self.run(options, args)
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 366, in run
use_user_site=options.use_user_site,
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\req\__init__.py", line 49, in install_given_reqs
**kwargs
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 760, in install
use_user_site=use_user_site, pycompile=pycompile,
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 382, in move_wheel_files
warn_script_location=warn_script_location,
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\wheel.py", line 215, in move_wheel_files
prefix=prefix,
File "C:\Users\mm\Anaconda3\lib\site-packages\pip\_internal\locations.py", line 165, in distutils_scheme
i.finalize_options()
File "C:\Users\mm\Anaconda3\lib\distutils\command\install.py", line 248, in finalize_options
"must supply either home or prefix/exec-prefix -- not both")
distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
----------------------------------------
Command "C:\Users\mm\Anaconda3\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\mm\AppData\Local\Temp\pip-build-env-1gfpkcpv --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools" failed with error code 2 in None
I have :
Python 3.7 with Anaconda
Windows 10 - 64 bit
Thanks very much

OSX: pyInstaller failing to download

For all packages I've installed, I've used
pip3 install [package name] and I haven't had any issues.
For PyInstaller I get this error message
Collecting pyinstaller
Using cached PyInstaller-3.6.tar.gz (3.5 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/st/_5np1sr92zl_34jy58rt65c40000gn/T/pip-build-env-9ad1w22t/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (44 lines):
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
Edit: From trying pip3 install --no-cache-dir pyinstaller
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/st/_5np1sr92zl_34jy58rt65c40000gn/T/pip-build-env-po9ly7dc/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

pyramid.arima Anaconda 3 Installation ERROR

I am using
macOS 10.12.6
Anaconda Navigator 1.9.7
JupiterLab 0.35.4
I have used the following GitHub project
I have tried the following installations
!pip install pyramid-arima
!pip install pmdarima
So I can use
from pyramid.arima import auto_arima
ERROR !pip install pmdarima
DOWNLOADED PACKAGES REACHED 100% for all
....
Installing build dependencies ... error
Complete output from command /Users/computer/anaconda3/bin/python /Users/computer/anaconda3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/rk/cd2m2z5s3cdfx12h9ltqk3500000gn/T/pip-build-env-vu2njaj5/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel cython>=0.29.14 "numpy==1.14.5; python_version=='3.5'" "numpy==1.14.5; python_version=='3.6'" "numpy==1.16.1; python_version=='3.7'" "numpy==1.17.5; python_version>='3.8'" scipy>=1.0:
Traceback (most recent call last):
File "/Users/computer/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/computer/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/computer/anaconda3/lib/python3.7/site-packages/pip/__main__.py", line 16, in <module>
from pip._internal import main as _main # isort:skip # noqa
File "/Users/computer/anaconda3/lib/python3.7/site-packages/pip/_internal/__init__.py", line 4, in <module>
import locale
File "/Users/computer/anaconda3/lib/python3.7/locale.py", line 16, in <module>
import re
File "/Users/computer/anaconda3/lib/python3.7/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
Command "/Users/computer/anaconda3/bin/python /Users/computer/anaconda3/lib/python3.7/site-
packages/pip install --ignore-installed --no-user --prefix
/private/var/folders/rk/cd2m2z5s3cdfx12h9ltqk3500000gn/T/pip-build-env-vu2njaj5/overlay --no-warn-script-
location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel
cython>=0.29.14 "numpy==1.14.5; python_version=='3.5'" "numpy==1.14.5; python_version=='3.6'"
"numpy==1.16.1; python_version=='3.7'" "numpy==1.17.5; python_version>='3.8'" scipy>=1.0" failed with
error code 1 in None
from pyramid.arima import auto_arima
ModuleNotFoundError: No module named 'pyramid.arima'
pyramid.arima is a depreciated expression at python 3.7
Anaconda
I have opened up anaconda promt as a system admin
than I have installed conda install -c saravji pmdarima

Cryptography module not installing

I am working on a project where I need cryptography module for python. When I go to install it (when I run pip install cryptography) I get an error and I dont know how to fix it. Do you have any ideas how to fix this, or any suggestions (is this common, is it a problem with my pip installation):
(venv) C:\Users\PC\Documents\Codes>pip install cryptography
Collecting cryptography
Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
Installing build dependencies ... error
Complete output from command C:\Users\PC\Documents\Codes\venv\Scripts\python.exe C:\Users\PC\Documents\Codes\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip install --ignore-installed --no-user --prefix C:\Users\PC\AppData\Local\Temp\pip-build-env-hc0skefe\overlay -
-no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'":
Collecting setuptools>=40.6.0
Using cached https://files.pythonhosted.org/packages/3d/72/1c1498c1e908e0562b1e1cd30012580baa7d33b5b0ffdbeb5fde2462cc71/setuptools-45.2.0-py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8
Using cached https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\setup.py", line 127, in <module>
if sys.platform == 'win32' and uses_msvc():
File "C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 185, in msvc14_get_vc_env
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 843, in __init__
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 485, in __init__
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\
----------------------------------------
Command "C:\Users\PC\Documents\Codes\venv\Scripts\python.exe C:\Users\PC\Documents\Codes\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip install --ignore-installed --no-user --prefix C:\Users\PC\AppData\Local\Temp\pip-build-env-hc0skefe\overlay --no-warn-script-locati
on --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'"" failed with error code 1 in None
Thanks in advance!!!!

Categories

Resources