質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pandas

Pandasは、PythonでRにおけるデータフレームに似た型を持たせることができるライブラリです。 行列計算の負担が大幅に軽減されるため、Rで行っていた集計作業をPythonでも比較的簡単に行えます。 データ構造を変更したりデータ分析したりするときにも便利です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

2回答

2347閲覧

CentOS7(raspberryPi)で、pandas がインストールできない.

bunchin

総合スコア5

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pandas

Pandasは、PythonでRにおけるデータフレームに似た型を持たせることができるライブラリです。 行列計算の負担が大幅に軽減されるため、Rで行っていた集計作業をPythonでも比較的簡単に行えます。 データ構造を変更したりデータ分析したりするときにも便利です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2020/03/02 08:49

前提・実現したいこと

環境:
HW: RaspberryPi 3B+
OS: CentOS 7.6

上記環境に、python3 (3.6.8)をyumでインストールし、pip3で、numpy まではインストールできたのですが、
pandas をインストールしようとすると、以下のエラーではじかれます.
[root@iot ~]# pip3 list
Package Version


Cython 0.29.15
numpy 1.13.3
pip 20.0.2
python-dateutil 2.8.1
pytz 2019.3
setuptools 45.2.0
six 1.14.0
wheel 0.34.2

解決方法をご存知の方、類似問題を解決したご経験ある方、
ご教示をお願いします。

発生している問題・エラーメッセージ

[root@iot ~]# sudo pip3 install pandas WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Collecting pandas Using cached pandas-1.0.1.tar.gz (4.9 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-zu806z90/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' cwd: None Complete output (10 lines): Ignoring numpy: markers 'python_version >= "3.7" and platform_system != "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version >= "3.7" and platform_system == "AIX"' don't match your environment WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7540db90>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/setuptools/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7540daf0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/setuptools/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7540dbd0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/setuptools/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7540d990>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/setuptools/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7540d8f0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/setuptools/ ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none) ERROR: No matching distribution found for setuptools ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-zu806z90/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' Check the logs for full command output. [root@iot ~]#

試したこと

numpyのインストールにおいて、"Building wheel for numpy (setup.py) ... error"のエラーが出ましたが、
[root@iot ~]# sudo yum install python3-tkinter
の実行で解消しました。
pandasでも同様にできないかトライしましたが、上記エラーが表示されます。

補足情報(FW/ツールのバージョンなど)


よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yukkeorg

2020/03/03 08:08

エラーの内容をみてみると、pipが接続しにいったホスト名の解決ができていないようですが、どのようなネットワーク環境で作業をしていますか?
bunchin

2020/03/03 08:57

会社のプロキシ経由でInternet接続しています(ログからは削除)。 yum, pipは接続できています。
bunchin

2020/03/04 07:40 編集

リトライしたところ、 Building wheel for pandas (setup.py) ... error が表示されました。 wheelは、 0.34.2 をインストーズ済です。 [root@booth-iot ]# time sudo /usr/local/bin/pip install --upgrade --proxy=http://********:8080/ pandas==0.25.3 Collecting pandas==0.25.3 Using cached pandas-0.25.3.tar.gz (12.6 MB) Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2.8.1) Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2019.3) Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (1.14.5) Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas==0.25.3) (1.14.0) Building wheels for collected packages: pandas <font color="red">Building wheel for pandas (setup.py) ... error</font> ERROR: Command errored out with exit status 1: command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s_frqhew/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s_frqhew/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ccmic8yi cwd: /tmp/pip-install-s_frqhew/pandas/ Complete output (2528 lines): running bdist_wheel running build running build_py creating build (略)
bunchin

2020/03/04 07:42 編集

”Building wheel for pandas (setup.py) ... error” と出ているので、wheelをremoveして、"--no-cache-dir"を付与して実行してみました。 結果、NGです。 [root@booth-iot ]# time sudo /usr/local/bin/pip install --proxy=********:8080/ --no-cache-dir pandas==0.25.3 Collecting pandas==0.25.3 Downloading pandas-0.25.3.tar.gz (12.6 MB) |????????????????????????????????| 12.6 MB 3.3 MB/s Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2.8.1) Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2019.3) Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (1.14.5) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas==0.25.3) (1.14.0) Installing collected packages: pandas Running setup.py install for pandas ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_8_g5fny/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_8_g5fny/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-dzl3_zhp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pandas cwd: /tmp/pip-install-_8_g5fny/pandas/ Complete output (2528 lines): running install running build running build_py creating build creating build/lib.linux-armv7l-3.6 creating build/lib.linux-armv7l-3 (略) gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_8_g5fny/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_8_g5fny/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-dzl3_zhp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pandas Check the logs for full command output. [root@booth-iot ]#
bunchin

2020/03/04 07:44 編集

下記の1,2を実施して実行すると、正常終了できました! 1. gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1 のエラーに対して、 以下を参照して、yum install gcc-c++ を実行. https://cast-a-spell.at.webry.info/201003/article_6.html 2. ERROR: Command errored out with exit status 1: command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; のエラーに対して、 以下を参照して、-Uのオプションを付与. https://qiita.com/yuta_vamdemic/items/324ae6ff1d519c80c138 [root@booth-iot ]# time sudo /usr/local/bin/pip install -U --proxy=********:8080/ --no-cache-dir pandas==0.25.3 Collecting pandas==0.25.3 Downloading pandas-0.25.3.tar.gz (12.6 MB) |????????????????????????????????| 12.6 MB 129 kB/s Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2.8.1) Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (2019.3) Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /usr/local/lib/python3.6/site-packages (from pandas==0.25.3) (1.14.5) Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas==0.25.3) (1.14.0) Installing collected packages: pandas Running setup.py install for pandas ... done Successfully installed pandas-0.25.3 [root@booth-iot ]# pip list Package Version --------------- ------- Cython 0.29.15 numpy 1.14.5 pandas 0.25.3 pip 20.0.2 python-dateutil 2.8.1 pytz 2019.3 setuptools 45.2.0 six 1.14.0 [root@booth-iot ]#
bunchin

2020/03/04 07:58

yukkeorg様、および、ご検討いただた皆さま、ありがとうございました。
guest

回答2

0

自己解決

[補足情報]にログ等を記載しておりますが、最初の状況から解決までのポイントは以下の通りです.

  1. pandas==0.25.3 とversion指定.
  2. wheelをuninstallし、"--no-cache-dir"を付与して yum install を実行.
  3. gcc-c++をyumでinstall
  4. "-U”を付与して、yum install を実行.

正しい方法とは言えないかもしれませんが、pandas インストールはできたので、解決とします.
尚、RaspberryPi 3B+上で、yum install pandas 実行すると、3H(wheel無,結果OK)~6H(wheel有,結果NG)を要しました.

投稿2020/03/04 07:55

bunchin

総合スコア5

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

エラーメッセージで検索しましたところ、他のQAサイトではありますが、以下の通り酷似した内容がありましたので確認してみてください。

StackOverflow - pip install で “NewConnectionError”、“Failed to establish a new connection”、“名前解決に一時的に失敗しました”と出力される。

投稿2020/03/03 10:54

yukkeorg

総合スコア985

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

bunchin

2020/03/03 23:38 編集

ご回答ありがとうございます。しかしながら、 上記URLに記載のように、「環境変数https_proxyにproxy情報を設定後」「 proxyオプションを付けてpipを実行」して、エラー発生しました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問