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

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

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

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

Q&A

解決済

1回答

3057閲覧

pip install numba のエラーを解決したい。

ccchogeee

総合スコア11

Python

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

0グッド

0クリップ

投稿2020/05/11 10:33

編集2020/05/11 10:34

前提・実現したいこと

pipを用いてnumbaのインストールを行いたいです。
いつもどおり

pip install numba

を実行したところ、大量のエラーが出たため、
こちらhttps://www.jkawamoto.info/blog-ja/install-numba-to-mac/のサイトを参考に、
numbaのインストールを行おうとしました。
しかし、

brew tap homebrew/versions

のコードで

Error: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.

のエラーが出てしまい、先に進めないです。
上のエラーの解決方法もしくは、何か他にnumbaをインストールする方法があれば教えていただきたいです。

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

pip install numbaエラー

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 numba Using cached numba-0.47.0-cp35-cp35m-macosx_10_9_x86_64.whl (2.0 MB) Collecting llvmlite>=0.31.0dev0 Using cached llvmlite-0.32.1.tar.gz (104 kB) Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from numba) (46.0.0) Requirement already satisfied: numpy in /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/lib/python3.5/site-packages (from numba) (1.16.4) Building wheels for collected packages: llvmlite Building wheel for llvmlite (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/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 /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-wheel-62q5yf18 cwd: /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ Complete output (26 lines): running bdist_wheel /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5 /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py LLVM version... Traceback (most recent call last): File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 106, in main_posix out = subprocess.check_output([llvm_config, '--version']) File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 316, in check_output **kwargs).stdout File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 383, in run with Popen(*popenargs, **kwargs) as process: File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 676, in __init__ restore_signals, start_new_session) File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 1282, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 192, in <module> main() File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 186, in main main_posix('osx', '.dylib') File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 109, in main_posix "to the path for llvm-config" % (llvm_config,)) RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config error: command '/Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for llvmlite Running setup.py clean for llvmlite Failed to build llvmlite Installing collected packages: llvmlite, numba Running setup.py install for llvmlite ... error ERROR: Command errored out with exit status 1: command: /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-record-orwedl62/install-record.txt --single-version-externally-managed --compile --install-headers /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/include/site/python3.5/llvmlite cwd: /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ Complete output (29 lines): running install running build got version from file /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/llvmlite/_version.py {'full': 'aa11b129c0b55973067422397821ae6d44fa5e70', 'version': '0.32.1'} running build_ext /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5 /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py LLVM version... Traceback (most recent call last): File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 106, in main_posix out = subprocess.check_output([llvm_config, '--version']) File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 316, in check_output **kwargs).stdout File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 383, in run with Popen(*popenargs, **kwargs) as process: File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 676, in __init__ restore_signals, start_new_session) File "/Users/local/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 1282, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 192, in <module> main() File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 186, in main main_posix('osx', '.dylib') File "/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/ffi/build.py", line 109, in main_posix "to the path for llvm-config" % (llvm_config,)) RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config error: command '/Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-install-92ostfkj/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/7c/nfxtf5pj11s4jcsrpyg1bzb80000gn/T/pip-record-orwedl62/install-record.txt --single-version-externally-managed --compile --install-headers /Users/local/.pyenv/versions/3.5.3/envs/pose_estimation_2/include/site/python3.5/llvmlite Check the logs for full command output.

brew tap homebrew/versionsエラー

Error: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.

試したこと

brew tap homebrew/versionsエラーの対処として、
こちらhttps://github.com/mrirecon/homebrew-bart/issues/1を参考に、

brew tap homebrew/homebrew-core

実行しましたが、この先からどうすればいいのか分からなくなりました。

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

macOS 10.15.4
python3.5(仮想環境を作って実行しています。)

よろしくお願いします!

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

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

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

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

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

ccchogeee

2020/05/12 00:43 編集

ご回答ありがとうございます!! llvmを入れる必要があるいうのはネットでみつけて、[brew install llvm]を実行して最新版を入れたのですが、そのあとの[pip install numba]ではエラーになってしまいインストールできませんでした。 llvmのバージョンが最新の 3.8.x ではなく 3.7.x が必要だと一番上に貼ったサイトに書いてあり、それを参考に[brew tap homebrew/versions]を実施したのですがそれもまたエラーでした。 もう少し方法を探してみます、ありがとうございます!
Yasumichi

2020/05/12 12:14

Windows の場合だと llvm-config が、インストーラーではインストールされないらしくて、Visual Studio で Debug でビルドするように書いてあるページがありました。まだ、こちらではうまくビルドできてないですけど。
ccchogeee

2020/05/13 04:58

githubから落としてきたコードを動かす際に、pip install numbaの手順が書かれていたので行いたかったのですが、とりあえずnumbaをインストールせずに進めてみたところ、コードを動かすことができました。ご協力いただきありがとうございました!!!
guest

回答1

0

自己解決

pip install numbaの手順を飛ばしても、コードを動かすことができました。
表題の件自体は解決していませんが、先に進めたので解決とさせていただきます。
ありがとうございます!

投稿2020/05/13 04:59

ccchogeee

総合スコア11

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問