본문 바로가기
Python

[Python] AttributeError: 'NoneType' object has no attribute 'bytes' 오류 해결

by bryan.oh 2022. 3. 16.
반응형

pip install 중 뜬금없이 이런 오류가 발생합니다.

Exception:
Traceback (most recent call last):
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\cli\base_command.py", line 179, in main
    status = self.run(options, args)
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\commands\install.py", line 393, in run
    use_user_site=options.use_user_site,
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\__init__.py", line 57, in install_given_reqs
    **kwargs
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\req_install.py", line 913, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\req_install.py", line 445, in move_wheel_files
    warn_script_location=warn_script_location,
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\wheel.py", line 544, in move_wheel_files
    generated.extend(maker.make(spec))
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 405, in make
    self._make_script(entry, filenames, options=options)
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 309, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 245, in _write_script
    launcher = self._get_launcher('t')
  File "c:\users\combr\pycharmprojects\pdfextractor\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 384, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'

 

해결

방법 1

python -m pip install --upgrade pip

방법 2

pip install -U --force-reinstall pip

방법 3 (이게 잘됨)

easy_install -U pip

 

저는 방법3으로 해결 했습니다.

뜬금없는 오류로 시간낭비했네요..

728x90
반응형

댓글