• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

autocomplete-python traceback output 오류 해결법(Mac)

21.11.06 15:17 작성 조회수 195

0

강의내용대로 진행하는데 autocomplete-python 패키지 에러가 떴습니다.
 
Traceback (most recent call last):
File "~\.atom\packages\autocomplete-python\lib\completion.py", line 8, in <module>
 
환경이 맥인데 검색을 해봐도 해결방법이 윈도우환경 밖에 없어서 한참을 헤맸네요.
 

답변 1

답변을 작성해보세요.

1

이래저래 알아보니 아톰에서 사전처럼 쓰는 Jedi의 최신버전이 제대로 불러들이지 못하는 에러때문입니다.
 
 

It seems related to importing Jedi.

1- Fix the import issue error:
https://stackoverflow.com/questions/63331116/python-3-6-8-jedi-importerror-cannot-import-name-traverse-parents

You can use pip3 install -e git://github.com/davidhalter/jedi.git#egg=jedi for reinstalling Jedi

2- Use Jedi 0.17.2 (Release History) :

pip install jedi==0.17.2

 
위의 방법대로 Jedi의 버전을 다운그레이드 해서 0.17.2로 설치하시면 됩니다.
설치는 터미널에서 위의 내용대로 입력하시면 됩니다.
 
만약 pip가 없다고 뜨면 설치를 해주셔야 하는데 아래의 내용을 참고하셔서 설치하고 업데이트까지 해주시면 됩니다.
 
<label class="tab-label" style="z-index:1;width:auto;border-bottom-width:2px;border-bottom-style:solid;border-color:var(--tabs--border--active);padding:1em 1.25em 0.5em;color:var(--tabs--label-text--active);transition:color 250ms;cursor:pointer;font-size:0.875em;font-weight:bold;background:var(--tabs--label-background--active);outline:none" for="tab-set--2-input--1">Unix/macOS</label>
python3 -m ensurepip --default-pip
<button class="copybtn o-tooltip--left" style="position:absolute;display:flex;top:0.3em;right:0.5em;width:1.7em;height:1.7em;opacity:0;transition:opacity 0.3s, border 0.3s, background-color 0.3s;padding:0px;outline:none;border-top-left-radius:0.4em;border-top-right-radius:0.4em;border-bottom-right-radius:0.4em;border-bottom-left-radius:0.4em;border:1px solid #e1e1e1;background-color:#f5f5f5" data-tooltip="Copy" data-clipboard-target="#codecell6"><img style="border:0px;max-width:100%;width:16.6875px;padding:0px" src="https://packaging.python.org/_static/copy-button.svg" alt="Copy to clipboard" /></button>
<input id="tab-set--2-input--2" class="tab-input" style="position:absolute;opacity:0" name="tab-set--2" type="radio" /><label class="tab-label" style="z-index:1;width:auto;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent;padding:1em 1.25em 0.5em;color:var(--tabs--label-text);transition:color 250ms;cursor:pointer;font-size:0.875em;font-weight:bold;outline:none" for="tab-set--2-input--2">Windows</label>

If that still doesn’t allow you to run python -m pip:

  • Securely Download get-pip.py 1

  • Run python get-pip.py2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.

    Warning

     

    Be cautious if you’re using a Python install that’s managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state. You can use pythonget-pip.py --prefix=/usr/local/ to install in /usr/local which is designed for locally-installed software.

Ensure pip, setuptools, and wheel are up to date

While pip alone is sufficient to install from pre-built binary archives, up to date copies of the setuptools and wheel projects are useful to ensure you can also install from source archives:

<input id="tab-set--3-input--1" class="tab-input" style="position:absolute;opacity:0" checked="checked" name="tab-set--3" type="radio" /><label class="tab-label" style="z-index:1;width:auto;border-bottom-width:2px;border-bottom-style:solid;border-color:var(--tabs--border--active);padding:1em 1.25em 0.5em;color:var(--tabs--label-text--active);transition:color 250ms;cursor:pointer;font-size:0.875em;font-weight:bold;background:var(--tabs--label-background--active);outline:none" for="tab-set--3-input--1">Unix/macOS</label>
python3 -m pip install --upgrade pip setuptools wheel
<button class="copybtn o-tooltip--left" style="position:absolute;display:flex;top:0.3em;right:0.5em;width:1.7em;height:1.7em;opacity:0;transition:opacity 0.3s, border 0.3s, background-color 0.3s;padding:0px;outline:none;border-top-left-radius:0.4em;border-top-right-radius:0.4em;border-bottom-right-radius:0.4em;border-bottom-left-radius:0.4em;border:1px solid #e1e1e1;background-color:#f5f5f5" data-tooltip="Copy" data-clipboard-target="#codecell8"><img style="border:0px;max-width:100%;width:16.6875px;padding:0px" src="https://packaging.python.org/_static/copy-button.svg" alt="Copy to clipboard" /></button>
<input id="tab-set--3-input--2" class="tab-input" style="position:absolute;opacity:0" name="tab-set--3" type="radio" /><label class="tab-label" style="z-index:1;width:auto;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent;padding:1em 1.25em 0.5em;color:var(--tabs--label-text);transition:color 250ms;cursor:pointer;font-size:0.875em;font-weight:bold;outline:none" for="tab-set--3-input--2">Windows</label>
Xeon님의 프로필

Xeon

2022.01.01

감사합니다. 파이썬 강의 초반부터 설치도 제대로 안되서 포기할뻔했습니다.

덕분에 기존 처럼 에러는 더이상 발생하지 않습니다.

아래 처럼 사용방법에 대한 예가 나오면 정상적인것 맞는걸까요?

네 제대로 나오는 것 같네요