0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pandasをインストールしようと思ったらインストールできなかった

Posted at

開発環境

・Mac M2
・python3.9.1
・pip 20.2.3

問題の発生

pandasを使いたいため以下のコマンドでバージョン指定をしてインストールを試みました

pip install pandas==1.4.0

しかし、以下のエラーメッセージが表示されました。

WARNING: You are using pip version 20.2.3; however, version 24.2 is available.
You should consider upgrading via the <ディレクトリ名> -m pip install --upgrade pip' command.

と、エラーが出ました。この警告からpipのバージョンが古いため問題が発生していることがわかりました。

解決方法

以下のコマンドでpipを最新バージョンにアップグレードしました。

pip install --upgrade pip

その後、pipのバージョンを再度確かめるとアップグレードできていることがわかりました。

pip 24.2

そして、再度pandasのインストールを試みると無事にインストールできました。

pip install pandas==1.4.0

学び

pipのバージョンが古いと、特定のライブラリのインストール等に失敗することがあるようです。開発環境を整える際は、pipのバージョンを最新に保つことが重要でだと感じました。特にPython初心者の方は、pipのアップグレードを怠らないようにしましょう。この記事がどなたか特に初心者の方の助けになれば幸いです。

pipのバージョンがv20.0代と24.0代では、だいぶ仕様が違うようです。依存関係?とやらも大幅なアップデートがあったみたいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?