<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pandas on Think and Write</title><link>https://kenjiusui.github.io/blog/tags/pandas/</link><description>Recent content in Pandas on Think and Write</description><generator>Hugo</generator><language>ja</language><lastBuildDate>Fri, 13 Aug 2021 00:37:47 +0900</lastBuildDate><atom:link href="https://kenjiusui.github.io/blog/tags/pandas/index.xml" rel="self" type="application/rss+xml"/><item><title>lzmaが入っていないって怒られるwarningを解消する</title><link>https://kenjiusui.github.io/blog/posts/biz/002_lzma%E3%81%8C%E5%85%A5%E3%81%A3%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E3%81%A3%E3%81%A6%E6%80%92%E3%82%89%E3%82%8C%E3%82%8Bwarning%E3%82%92%E8%A7%A3%E6%B6%88%E3%81%99%E3%82%8B/</link><pubDate>Fri, 13 Aug 2021 00:37:47 +0900</pubDate><guid>https://kenjiusui.github.io/blog/posts/biz/002_lzma%E3%81%8C%E5%85%A5%E3%81%A3%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E3%81%A3%E3%81%A6%E6%80%92%E3%82%89%E3%82%8C%E3%82%8Bwarning%E3%82%92%E8%A7%A3%E6%B6%88%E3%81%99%E3%82%8B/</guid><description>&lt;p&gt;pandasを使っていたら下記のwarningがでていたのを解決したので備忘録。&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="環境"&gt;環境&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;OS: macOS Catalina 10.15.7&lt;/li&gt;
&lt;li&gt;Python: 3.8.1&lt;/li&gt;
&lt;li&gt;pandas: 1.3.1&lt;/li&gt;
&lt;li&gt;pyenv: 2.0.1&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="解決方法"&gt;解決方法&lt;/h1&gt;
&lt;p&gt;どうやらpyenvを通してPythonをインストールしていると発生するようです。&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/pandas-dev/pandas/issues/27532"&gt;https://github.com/pandas-dev/pandas/issues/27532&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;対処法は &lt;code&gt;xz&lt;/code&gt; をインストールしてから改めてPythonをインストールします。&lt;br&gt;
xzはbrewにあるので簡単です。&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;brew install xz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;これでxzが入るのでPythonをインストールしなおせばOK。&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;pyenv uninstall 3.8.1
pyenv install 3.8.1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;これでwarningが消えました 🙌&lt;/p&gt;</description></item></channel></rss>