LoginSignup
0
1

More than 3 years have passed since last update.

【Python】PyAutoGuiインストールエラー対策(2020.08.09)

Posted at

概要

PyAutoGuiをインストールしようとしたらエラー発生。コメントを見ると、PyMsgBoxのインストールでエラーが出ていたため、バージョンを下げて個別にインストール。もう一度PyAutoGuiを試したらインストールできた。

エラー内容と対策方法

4行目「pymsgbox」でエラーを出していることがわかる。とりあえずpymsgboxのバージョンを下げて試したところインストールできた。その状態だとPyAutoGuiを無事インストールできた。

C:\WINDOWS\system32>pip install PyAutoGUI
Collecting PyAutoGUI
  Using cached PyAutoGUI-0.9.50.tar.gz (57 kB)
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\username\anaconda3\python.exe' 'c:\users\username\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\username\AppData\Local\Temp\pip-build-env-o7p6t8ru\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 (42 lines):
  Traceback (most recent call last):
    File "c:\users\username\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "c:\users\username\anaconda3\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "c:\users\username\anaconda3\lib\site-packages\pip\__main__.py", line 26, in <module>
      sys.exit(_main())
    File "c:\users\username\anaconda3\lib\site-packages\pip\_internal\cli\main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "c:\users\username\anaconda3\lib\site-packages\pip\_internal\commands\__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "c:\users\username\anaconda3\lib\importlib\__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
    File "<frozen importlib._bootstrap>", line 983, in _find_and_load
    File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 728, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "c:\users\username\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 17, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "c:\users\username\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 16, in <module>
      from pip._internal.index.collector import LinkCollector
    File "c:\users\username\anaconda3\lib\site-packages\pip\_internal\index\collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "c:\users\username\anaconda3\lib\site-packages\pip\_vendor\requests\__init__.py", line 125, in <module>
      from . import utils
    File "c:\users\username\anaconda3\lib\site-packages\pip\_vendor\requests\utils.py", line 25, in <module>
      from . import certs
    File "c:\users\username\anaconda3\lib\site-packages\pip\_vendor\requests\certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "c:\users\username\anaconda3\lib\site-packages\pip\_vendor\certifi\__init__.py", line 1, in <module>
      from .core import contents, where
    File "c:\users\username\anaconda3\lib\site-packages\pip\_vendor\certifi\core.py", line 12, in <module>
      from importlib.resources import path as get_path, read_text
    File "c:\users\username\anaconda3\lib\importlib\resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "c:\users\username\anaconda3\lib\site-packages\typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "c:\users\username\anaconda3\lib\site-packages\typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\username\anaconda3\python.exe' 'c:\users\username\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\username\AppData\Local\Temp\pip-build-env-o7p6t8ru\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

その他メモ

  • conda, pip3でもやはりエラーを発生。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1