728x90
이번에는 wrf-python을 설치해보겠습니다
wrf-python을 설치할 때 이전 포스팅에서 basemap을 설치할 때와 같은 에러가 발생했습니다
이는 wrf-python 라이브러리가 basemap을 필요로 하기 때문입니다
그러면 basemap 문제를 해결하면 이 문제도 자동으로 해결된다는 거겠죠??
해결법입니다
echo 'export GEOS_DIR=/opt/homebrew/Cellar/geos/3.12.0/' >> ~/.zshrc
source ~/.zshrc
요렇게 환경변수를 선언해 주시구요
설치를 진행하시면
(base) lsh@isuhyeons-MacBook-Air / % pip install wrf-python
Collecting wrf-python
Downloading wrf-python-1.3.4.1.tar.gz (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 11.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: basemap in /Users/lsh/miniconda3/lib/python3.11/site-packages (from wrf-python) (1.3.8)
Requirement already satisfied: numpy>=1.11 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from wrf-python) (1.25.2)
Requirement already satisfied: setuptools in /Users/lsh/miniconda3/lib/python3.11/site-packages (from wrf-python) (67.8.0)
Collecting wrapt (from wrf-python)
Downloading wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl (36 kB)
Collecting xarray (from wrf-python)
Using cached xarray-2023.8.0-py3-none-any.whl (1.0 MB)
Requirement already satisfied: basemap-data<1.4,>=1.3.2 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from basemap->wrf-python) (1.3.2)
Requirement already satisfied: pyshp<2.4,>=1.2 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from basemap->wrf-python) (2.3.1)
Requirement already satisfied: matplotlib<3.8,>=1.5 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from basemap->wrf-python) (3.7.2)
Requirement already satisfied: pyproj<3.7.0,>=1.9.3 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from basemap->wrf-python) (3.6.0)
Requirement already satisfied: pandas>=1.4 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from xarray->wrf-python) (2.1.0)
Requirement already satisfied: packaging>=21.3 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from xarray->wrf-python) (23.0)
Requirement already satisfied: contourpy>=1.0.1 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (1.4.5)
Requirement already satisfied: pillow>=6.2.0 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (10.0.0)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap->wrf-python) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from pandas>=1.4->xarray->wrf-python) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from pandas>=1.4->xarray->wrf-python) (2023.3)
Requirement already satisfied: certifi in /Users/lsh/miniconda3/lib/python3.11/site-packages (from pyproj<3.7.0,>=1.9.3->basemap->wrf-python) (2023.5.7)
Requirement already satisfied: six>=1.5 in /Users/lsh/miniconda3/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap->wrf-python) (1.16.0)
Building wheels for collected packages: wrf-python
Building wheel for wrf-python (setup.py) ... done
Created wheel for wrf-python: filename=wrf_python-1.3.4.1-cp311-cp311-macosx_11_0_arm64.whl size=383183 sha256=036b1de33bb51a93fc9eeec7221a979bffebbe9168655fcd03a3137d3f0ecd2d
Stored in directory: /Users/lsh/Library/Caches/pip/wheels/3e/8b/49/bed9193eff81cb531deec2a9b18fc18fcdb476f048897086ff
Successfully built wrf-python
Installing collected packages: wrapt, xarray, wrf-python
Successfully installed wrapt-1.15.0 wrf-python-1.3.4.1 xarray-2023.8.0
잘 설치가 됩니다
스택오버플로우나 익스체인지를 보면 m1 맥은 아직 지원을 안한다고 되어 있는데
위 방식으로 설치하고 사용해보니 잘 됩니다
사용하실 분들은 이렇게 하시면 될 것 같습니다
728x90
'Mac' 카테고리의 다른 글
Mac M1 환경에서 ncl 실행 (M2 에러 해결 포함) (4) | 2024.04.28 |
---|---|
Mac : Too many open files 에러 해결 (0) | 2023.12.09 |
M1 Mac에 basemap 설치하기 (2) | 2023.09.11 |
Homebrew 설치와 사용 (0) | 2023.09.10 |
내가 맥북 에어 M1을 산 이유 (0) | 2023.09.10 |