본문 바로가기
목차
파이썬

[파이썬]Unable to import required dependencies:numpy:

by 지각생 2022. 8. 22.
728x90

해결방안:

numpy라이브러리 삭제했다가 다시 설치해도 안되서 아나콘다 설치해서 해결함.

(아나콘다 쓰면 파이썬 기본적인 라이브러리 내장 및 환경설정 자동으로 해결)

 

오류현상:

Output exceeds the size limit. Open the full output data in a text editor

--------------------------------------------------------------------------- ImportError Traceback (most recent call last) /Users/txt2excel_3.ipynb 셀 4 in <cell line: 1>() ----> 1 import pandas as pd 2 import numpy as np 3 import os File ~/Library/Python/3.8/lib/python/site-packages/pandas/__init__.py:16, in <module> 13 missing_dependencies.append(f"{dependency}: {e}") 15 if missing_dependencies: ---> 16 raise ImportError( 17 "Unable to import required dependencies:\n" + "\n".join(missing_dependencies) 18 ) 19 del hard_dependencies, dependency, missing_dependencies 21 # numpy compat ImportError: Unable to import required dependencies: numpy: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
...

 

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help. Original error was: dlopen(/Users/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 0x0002): tried: '/Users/sonsangwoo/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
 
 
728x90

댓글