Warning-Could not import the lzma module
/.pyenv/versions/pandas/lib/python3.7/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
warnings.warn(msg)
.py
ํ์ผ์ ์คํ์์ผฐ์ ๋ ๋ค์๊ณผ ๊ฐ์ warning์ด ๋ด๋ค. stackoverflow์ ์ฐพ์๋ณด๋ python ์์ค์ฝ๋๋ฅผ ์ปดํ์ผ ํ๋ ค๋ฉด ๋ฐ๋์ liblzma-dev๊ฐ ์ค์น๋์ด์์ด์ผํ๋ค๊ณ ํ๋ค.
Install liblzma using homebrew
$ brew install xz
xz๋ฅผ ์ค์นํ๊ณ ๋ ํ์ ๊ธฐ์กด์ ์ค์นํ pyenv version์ ์ญ์ ํ ์ฌ์ค์นํด์ค์ผํ๋ค.
$ pyenv unsinstall 3.7.1
pyenv: remove /Users/jeongdaye/.pyenv/versions/3.7.1? y
$ pyenv install 3.7.1
์ค์น๊ฐ ์๋ฃ๋๋ฉด ์๋ ์ฝ๋๊ฐ .zshrc
์ ์๋ค๋ฉด ์ถ๊ฐํด์ค๋ค.
eval "$(pyenv init -)"
$ source .zshrc
์ค์น ํ ๋ค์ python ๋ช ๋ น์ด๋ฅผ ์ํํ๋ฉด ๋ค์๊ณผ ๊ฐ์ด warning message์์ด ์คํ๋๋ ๊ฒ์ ํ์ธํ ์ ์๋ค.
python serires.py
<class 'pandas.core.series.Series'>
a 11
b 2
c 3
dtype: int64
์ฐธ๊ณ
Last updated
Was this helpful?