Python

Import "ace_tools" could not be resolved Pylance(reportMissingImports)

xojuholic 2024. 8. 9. 11:49
728x90
반응형

간혹 Windows 11 PC에서 VSCode를 사용하는 경우가 있는데, 이럴 경우 본인은 WSL 환경을 설정하고 여기에 VSCode를 연결하여 Python 작업을 한다.

그런데, 오늘 아래와 같은 상황에 맞닥뜨렸다.

import ace_tools as tools	# Error

그래서, 제목을 같은 문구로 적어놓은 것인데, 아무리 아래 명령들을 차례로 입력해봐도 저 문제가 해결되지 않는 것이었다.

pip show ace_tools		# ace_tools 설치 여부 확인
pip install ace_tools		# 정상적 설치 완료 확인
pip list

 

그래서 검색을 계속 하다가 해결 방법을 언급한 사이트를 찾았다.

https://community.openai.com/t/chatgpt-recommends-the-use-of-the-open-ai-internal-library-ace-tools/852665/25

 

ChatGPT recommends the use of the Open AI internal library ace_tools

This is still happening. My prompt was for web scraping code for publicly available information about companies as a test for 4o, but the suggested code ended with: Display DataFrame to user import ace_tools as tools; tools.display_dataframe_to_user(name=

community.openai.com

 

위 링크 내용을 참고해서 아래와 같이 적용 후 문제를 해결했다.

pip install ace_tools_open

# 이후 아래와 같이 import 구문을 수정
import ace_tools_open as tools
728x90
반응형
SMALL