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

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

新規登録して質問してみよう
ただいま回答率
85.48%
docker-compose

docker-composeとは、複数のコンテナで構成されるサービスを提供する手順を自動的し管理を簡単にするツール。composeファイルを使用しコマンド1回で設定した全サービスを作成・起動することが可能です。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

1回答

762閲覧

Dockerでスクレイピング用のコンテナを作成したいが、ビルドでエラーになる

Nero1129

総合スコア130

docker-compose

docker-composeとは、複数のコンテナで構成されるサービスを提供する手順を自動的し管理を簡単にするツール。composeファイルを使用しコマンド1回で設定した全サービスを作成・起動することが可能です。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2020/01/28 11:09

前提・実現したいこと

Dockerでスクレイピング用のコンテナを作成したいのですが、pipでインストール中に下記のようにエラーになってしまい、失敗します。
イメージはpython:alpine
形態素分析をするため、MeCabの辞書をWindowsのAnacondaに入れるといろいろ不備があったので、コンテナを作成しようと思いました。

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

$ apk add --update --no-cache curl git bash file sudo openssh make gcc g++ curl ## 実行済 $ /usr/local/bin/python -m pip install --upgrade pip ## 実行済 $ pip install mecab-python3 numpy pandas sklearn beautifulsoup4 requests neologdn ## エラーになる Collecting scipy>=0.17.0 Downloading scipy-1.4.1.tar.gz (24.6 MB) |████████████████████████████████| 24.6 MB 14.3 MB/s Installing build dependencies ... \ done Getting requirements to build wheel ... done Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpiyo4xhry cwd: /tmp/pip-install-o4bbympy/scipy Complete output (139 lines): lapack_opt_info: lapack_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/'] NOT AVAILABLE openblas_lapack_info: customize UnixCCompiler customize UnixCCompiler libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/'] NOT AVAILABLE openblas_clapack_info: customize UnixCCompiler customize UnixCCompiler libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/'] NOT AVAILABLE flame_info: customize UnixCCompiler libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/'] NOT AVAILABLE atlas_3_10_threads_info: Setting PTATLAS=ATLAS customize UnixCCompiler libraries lapack_atlas not found in /usr/local/lib customize UnixCCompiler libraries tatlas,tatlas not found in /usr/local/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib customize UnixCCompiler libraries tatlas,tatlas not found in /usr/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib/ customize UnixCCompiler libraries tatlas,tatlas not found in /usr/lib/ <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> NOT AVAILABLE atlas_3_10_info: customize UnixCCompiler libraries lapack_atlas not found in /usr/local/lib customize UnixCCompiler libraries satlas,satlas not found in /usr/local/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib customize UnixCCompiler libraries satlas,satlas not found in /usr/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib/ customize UnixCCompiler libraries satlas,satlas not found in /usr/lib/ <class 'numpy.distutils.system_info.atlas_3_10_info'> NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS customize UnixCCompiler libraries lapack_atlas not found in /usr/local/lib customize UnixCCompiler libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib customize UnixCCompiler libraries ptf77blas,ptcblas,atlas not found in /usr/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib/ customize UnixCCompiler libraries ptf77blas,ptcblas,atlas not found in /usr/lib/ <class 'numpy.distutils.system_info.atlas_threads_info'> NOT AVAILABLE atlas_info: customize UnixCCompiler libraries lapack_atlas not found in /usr/local/lib customize UnixCCompiler libraries f77blas,cblas,atlas not found in /usr/local/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib customize UnixCCompiler libraries f77blas,cblas,atlas not found in /usr/lib customize UnixCCompiler libraries lapack_atlas not found in /usr/lib/ customize UnixCCompiler libraries f77blas,cblas,atlas not found in /usr/lib/ <class 'numpy.distutils.system_info.atlas_info'> NOT AVAILABLE accelerate_info: NOT AVAILABLE lapack_info: customize UnixCCompiler libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/'] NOT AVAILABLE lapack_src_info: NOT AVAILABLE NOT AVAILABLE setup.py:418: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-xa6mg2ok'), proceeding with generating Cython sources and expanding templates warnings.warn("Unrecognized setuptools command ('{}'), proceeding with " Running from scipy source directory. /tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:1712: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. if getattr(self, '_calc_info_{}'.format(lapack))(): /tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:1712: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. if getattr(self, '_calc_info_{}'.format(lapack))(): Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module> main() File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel self.run_setup() File "/tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 242, in run_setup super(_BuildMetaLegacyBackend, File "/tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 540, in <module> setup_package() File "setup.py", line 536, in setup_package setup(**metadata) File "/tmp/pip-build-env-s92al3hm/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 137, in setup config = configuration() File "setup.py", line 435, in configuration raise NotFoundError(msg) numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpiyo4xhry Check the logs for full command output.

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

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

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

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

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

guest

回答1

0

ベストアンサー

このへんのパッケージを追加でインストールすればうまくビルドできるように思います。

apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev

link: https://gist.github.com/orenitamar/f29fb15db3b0d13178c1c4dd611adce2

投稿2020/01/28 16:45

yuokada

総合スコア550

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問