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

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

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

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

Q&A

解決済

1回答

2910閲覧

(python3.7.5 rc1)jupyter notebook でimport pandas エラー

kmll

総合スコア19

Python 3.x

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

0グッド

0クリップ

投稿2020/04/25 10:10

jupyter notebookでinstallする
import pandas as pd で下記のようなエラーが発生します。

ImportError Traceback (most recent call last) <ipython-input-4-38d4b0363d82> in <module> ----> 1 import pandas ~/opt/anaconda3/lib/python3.7/site-packages/pandas/__init__.py in <module> 53 import pandas.core.config_init 54 ---> 55 from pandas.core.api import ( 56 # dtype 57 Int8Dtype, ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/api.py in <module> 13 14 from pandas.core.algorithms import factorize, unique, value_counts ---> 15 from pandas.core.arrays import Categorical 16 from pandas.core.arrays.boolean import BooleanDtype 17 from pandas.core.arrays.integer import ( ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/arrays/__init__.py in <module> 5 try_cast_to_ea, 6 ) ----> 7 from pandas.core.arrays.boolean import BooleanArray 8 from pandas.core.arrays.categorical import Categorical 9 from pandas.core.arrays.datetimes import DatetimeArray ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/arrays/boolean.py in <module> 26 from pandas.core.dtypes.missing import isna, notna 27 ---> 28 from pandas.core import nanops, ops 29 from pandas.core.indexers import check_array_indexer 30 ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/nanops.py in <module> 33 from pandas.core.dtypes.missing import isna, na_value_for_dtype, notna 34 ---> 35 bn = import_optional_dependency("bottleneck", raise_on_missing=False, on_version="warn") 36 _BOTTLENECK_INSTALLED = bn is not None 37 _USE_BOTTLENECK = False ~/opt/anaconda3/lib/python3.7/site-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version) 96 minimum_version = VERSIONS.get(name) 97 if minimum_version: ---> 98 version = _get_version(module) 99 if distutils.version.LooseVersion(version) < minimum_version: 100 assert on_version in {"warn", "raise", "ignore"} ~/opt/anaconda3/lib/python3.7/site-packages/pandas/compat/_optional.py in _get_version(module) 41 42 if version is None: ---> 43 raise ImportError(f"Can't determine version for {module.__name__}") 44 return version 45 ImportError: Can't determine version for bottleneck`` ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー bottleneck をpipでインストールしようとすると下記の様なエラーになります。``エラー ERROR: Command errored out with exit status 1: command: /Users/mac/.pyenv/versions/3.7.5rc1/bin/python3.7 /Users/mac/.pyenv/versions/3.7.5rc1/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/86/pq1j47vs2r37vsp08b239dn40000gn/T/tmpxcaso_c6 cwd: /private/var/folders/86/pq1j47vs2r37vsp08b239dn40000gn/T/pip-install-cmgzmj2f/bottleneck Complete output (127 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.11-x86_64-3.7 creating build/lib.macosx-10.11-x86_64-3.7/bottleneck copying bottleneck/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck copying bottleneck/_pytesttester.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck copying bottleneck/_version.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck creating build/lib.macosx-10.11-x86_64-3.7/bottleneck/benchmark copying bottleneck/benchmark/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/benchmark copying bottleneck/benchmark/autotimeit.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/benchmark copying bottleneck/benchmark/bench.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/benchmark copying bottleneck/benchmark/bench_detailed.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/benchmark creating build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow copying bottleneck/slow/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow copying bottleneck/slow/move.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow copying bottleneck/slow/nonreduce.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow copying bottleneck/slow/nonreduce_axis.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow copying bottleneck/slow/reduce.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/slow creating build/lib.macosx-10.11-x86_64-3.7/bottleneck/src copying bottleneck/src/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/src copying bottleneck/src/bn_config.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/src copying bottleneck/src/bn_template.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/src creating build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/input_modification_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/list_input_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/memory_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/move_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/nonreduce_axis_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/nonreduce_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/reduce_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/scalar_input_test.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests copying bottleneck/tests/util.py -> build/lib.macosx-10.11-x86_64-3.7/bottleneck/tests UPDATING build/lib.macosx-10.11-x86_64-3.7/bottleneck/_version.py set build/lib.macosx-10.11-x86_64-3.7/bottleneck/_version.py to '1.3.2' running build_ext running config compiling '_configtest.c': #pragma clang diagnostic error "-Wattributes" int __attribute__((optimize("O3"))) have_attribute_optimize_opt_3(void*); int main(void) { return 0; } clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -c _configtest.c -o _configtest.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun failure. removing: _configtest.c _configtest.o compiling '_configtest.c': #ifndef __cplusplus static inline int static_func (void) { return 0; } inline int nostatic_func (void) { return 0; } #endif int main(void) { int r1 = static_func(); int r2 = nostatic_func(); return r1 + r2; } clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -c _configtest.c -o _configtest.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun failure. removing: _configtest.c _configtest.o compiling '_configtest.c': #ifndef __cplusplus static __inline__ int static_func (void) { return 0; } __inline__ int nostatic_func (void) { return 0; } #endif int main(void) { int r1 = static_func(); int r2 = nostatic_func(); return r1 + r2; } clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -c _configtest.c -o _configtest.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun failure. removing: _configtest.c _configtest.o compiling '_configtest.c': #ifndef __cplusplus static __inline int static_func (void) { return 0; } __inline int nostatic_func (void) { return 0; } #endif int main(void) { int r1 = static_func(); int r2 = nostatic_func(); return r1 + r2; } clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -c _configtest.c -o _configtest.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun failure. removing: _configtest.c _configtest.o building 'bottleneck.reduce' extension creating build/temp.macosx-10.11-x86_64-3.7 creating build/temp.macosx-10.11-x86_64-3.7/bottleneck creating build/temp.macosx-10.11-x86_64-3.7/bottleneck/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/private/var/folders/86/pq1j47vs2r37vsp08b239dn40000gn/T/pip-build-env-xkhraskl/overlay/lib/python3.7/site-packages/numpy/core/include -I/Users/mac/.pyenv/versions/3.7.5rc1/include/python3.7m -Ibottleneck/src -c bottleneck/src/reduce.c -o build/temp.macosx-10.11-x86_64-3.7/bottleneck/src/reduce.o -O2 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command 'clang' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for bottleneck Failed to build bottleneck ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly

解決策をお願いいたします。

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

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

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

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

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

guest

回答1

0

ベストアンサー

この記事が参考になると思います.anacondaをupdateすれば良いようです

投稿2020/04/25 13:20

dark-eater-kei

総合スコア1248

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.46%

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

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

質問する

関連した質問