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

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

新規登録して質問してみよう
ただいま回答率
85.47%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

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

Q&A

解決済

2回答

12677閲覧

scipyをimportしたいです

abcdabcd

総合スコア22

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

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

0グッド

0クリップ

投稿2022/04/05 03:39

前提

macにpythonの環境を構築中です.scipyをinstallしたいです.
homebrewでpyenvをinstallしました.
pythonのversionは3.9.6です.

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

pip install scipyで以下のようなエラーが出ます

Collecting scipy Using cached scipy-1.8.0.tar.gz (38.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [177 lines of output] setup.py:482: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-modern-metadata-tcry99ki'), proceeding with generating Cython sources and expanding templates warnings.warn("Unrecognized setuptools command ('{}'), proceeding with " Running from SciPy source directory. 中略 Processing scipy/stats/_boost/src/binom_ufunc.pyx Processing scipy/stats/_unuran/unuran_wrapper.pyx warning: unuran_wrapper.pyx:470:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:470:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:470:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:515:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:515:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:515:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:1476:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:1476:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: unuran_wrapper.pyx:1476:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. Cythonizing sources lapack_opt_info: lapack_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/Users/username/.pyenv/versions/3.9.6/lib', '/usr/lib'] NOT AVAILABLE openblas_lapack_info: libraries openblas not found in ['/Users/username/.pyenv/versions/3.9.6/lib', '/usr/lib'] NOT AVAILABLE openblas_clapack_info: libraries openblas,lapack not found in ['/Users/username/.pyenv/versions/3.9.6/lib', '/usr/lib'] NOT AVAILABLE flame_info: libraries flame not found in ['/Users/username/.pyenv/versions/3.9.6/lib', '/usr/lib'] NOT AVAILABLE atlas_3_10_threads_info: Setting PTATLAS=ATLAS libraries lapack_atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries tatlas,tatlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries lapack_atlas not found in /usr/lib libraries tatlas,tatlas not found in /usr/lib <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> NOT AVAILABLE atlas_3_10_info: libraries lapack_atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries satlas,satlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries lapack_atlas not found in /usr/lib 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 libraries lapack_atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries ptf77blas,ptcblas,atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries lapack_atlas not found in /usr/lib libraries ptf77blas,ptcblas,atlas not found in /usr/lib <class 'numpy.distutils.system_info.atlas_threads_info'> NOT AVAILABLE atlas_info: libraries lapack_atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries f77blas,cblas,atlas not found in /Users/username/.pyenv/versions/3.9.6/lib libraries lapack_atlas not found in /usr/lib libraries f77blas,cblas,atlas not found in /usr/lib <class 'numpy.distutils.system_info.atlas_info'> NOT AVAILABLE lapack_info: libraries lapack not found in ['/Users/username/.pyenv/versions/3.9.6/lib', '/usr/lib'] NOT AVAILABLE /private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1849: 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. return getattr(self, '_calc_info_{}'.format(name))() lapack_src_info: NOT AVAILABLE /private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1849: 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. return getattr(self, '_calc_info_{}'.format(name))() NOT AVAILABLE Traceback (most recent call last): File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module> main() File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "/private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "/private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 626, in <module> setup_package() File "setup.py", line 622, in setup_package setup(**metadata) File "/private/var/folders/h_/8vnp2dt96s9c3g0_0k_yrty40000gn/T/pip-build-env-f2b9vlrj/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 135, in setup config = configuration() File "setup.py", line 522, in configuration raise NotFoundError(msg) numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported. To build Scipy from sources, BLAS & LAPACK libraries need to be installed. See site.cfg.example in the Scipy source directory and https://docs.scipy.org/doc/scipy/reference/building/index.html for details. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.

試したこと

https://qiita.com/C2_now/items/c85be2ffeacd61cc7207
にあるようにbrew install scipyでも試しましたが,import 出来ませんでした.

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

macOS big Sur
バージョン 11.6.5
macbook air (M1, 2020)

zprofile

1eval $(/opt/homebrew/bin/brew shellenv) 2eval "$(pyenv init --path)"

zshrc

1eval "$(pyenv init -)"

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

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

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

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

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

guest

回答2

0

極めて合理的な解決策 geometry dash meltdown

投稿2024/02/05 09:52

annamivivan

総合スコア2

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

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

0

自己解決

https://qiita.com/hiracchi/items/7bafa8b8d91750573831
に従うと解決しました.ありがとうございました.

投稿2022/04/05 07:47

abcdabcd

総合スコア22

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問