前提・実現したいこと
機械学習を勉強中です。
今回tensorflowを使用するための仮想環境を構築しようと、
zsh
1$ conda create -n tensorflow python=3.6 anaconda
としたところ、エラーがでて、自力で対処できなくなりました。
対処方法について教えていただきたいです。
よろしくお願いいたします。
ホームディレクトリ名は******としています。
発生している問題・エラーメッセージ
zsh
1$ conda create -n tensorflow python=3.6 anaconda 2Solving environment: failed 3 4# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< 5 6 Traceback (most recent call last): 7 File "/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 819, in __call__ 8 return func(*args, **kwargs) 9 File "/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main 10 exit_code = do_call(args, p) 11 File "/anaconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call 12 exit_code = getattr(module, func_name)(args, parser) 13 File "/anaconda3/lib/python3.6/site-packages/conda/cli/main_create.py", line 11, in execute 14 install(args, parser, 'create') 15 File "/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 235, in install 16 force_reinstall=context.force, 17 File "/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 518, in solve_for_transaction 18 force_remove, force_reinstall) 19 File "/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 451, in solve_for_diff 20 final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) 21 File "/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 180, in solve_final_state 22 index, r = self._prepare(prepared_specs) 23 File "/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 592, in _prepare 24 self.subdirs, prepared_specs) 25 File "/anaconda3/lib/python3.6/site-packages/conda/core/index.py", line 215, in get_reduced_index 26 new_records = query_all(spec) 27 File "/anaconda3/lib/python3.6/site-packages/conda/core/index.py", line 184, in query_all 28 return tuple(concat(future.result() for future in as_completed(futures))) 29 File "/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 95, in query 30 self.load() 31 File "/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 149, in load 32 _internal_state = self._load() 33 File "/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 227, in _load 34 mod_etag_headers.get('_mod')) 35 File "/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 437, in fetch_repodata_remote_request 36 timeout=timeout) 37 File "/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 521, in get 38 return self.request('GET', url, **kwargs) 39 File "/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 499, in request 40 prep.url, proxies, stream, verify, cert 41 File "/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 672, in merge_environment_settings 42 env_proxies = get_environ_proxies(url, no_proxy=no_proxy) 43 File "/anaconda3/lib/python3.6/site-packages/requests/utils.py", line 692, in get_environ_proxies 44 if should_bypass_proxies(url, no_proxy=no_proxy): 45 File "/anaconda3/lib/python3.6/site-packages/conda/gateways/connection/__init__.py", line 10, in should_bypass_proxies_patched 46 return should_bypass_proxies_func(url, no_proxy) 47 File "/anaconda3/lib/python3.6/site-packages/requests/utils.py", line 676, in should_bypass_proxies 48 bypass = proxy_bypass(netloc) 49 File "/anaconda3/lib/python3.6/urllib/request.py", line 2612, in proxy_bypass 50 return proxy_bypass_macosx_sysconf(host) 51 File "/anaconda3/lib/python3.6/urllib/request.py", line 2589, in proxy_bypass_macosx_sysconf 52 return _proxy_bypass_macosx_sysconf(host, proxy_settings) 53 File "/anaconda3/lib/python3.6/urllib/request.py", line 2575, in _proxy_bypass_macosx_sysconf 54 if (hostIP >> mask) == (base >> mask): 55 ValueError: negative shift count 56 57`$ /anaconda3/bin/conda create -n tensorflow python=3.6 anaconda` 58 59 environment variables: 60 CIO_TEST=<not set> 61 CONDA_ROOT=/anaconda3 62 PATH=/Users/******/.pyenv/shims:/Users/******/.pyenv/bin:/ana 63 conda3/bin:/Users/******/anaconda3/bin:/Library/Frameworks/Pyth 64 on.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Ver 65 sions/3.6/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/ 66 sbin:/opt/X11/bin 67 REQUESTS_CA_BUNDLE=<not set> 68 SSL_CERT_FILE=<not set> 69 70 active environment : None 71 user config file : /Users/******/.condarc 72 populated config files : /Users/******/.condarc 73 conda version : 4.5.12 74 conda-build version : 3.4.1 75 python version : 3.6.8.final.0 76 base environment : /anaconda3 (writable) 77 channel URLs : https://repo.anaconda.com/pkgs/main/osx-64 78 https://repo.anaconda.com/pkgs/main/noarch 79 https://repo.anaconda.com/pkgs/free/osx-64 80 https://repo.anaconda.com/pkgs/free/noarch 81 https://repo.anaconda.com/pkgs/r/osx-64 82 https://repo.anaconda.com/pkgs/r/noarch 83 https://repo.anaconda.com/pkgs/pro/osx-64 84 https://repo.anaconda.com/pkgs/pro/noarch 85 https://conda.anaconda.org/conda-forge/osx-64 86 https://conda.anaconda.org/conda-forge/noarch 87 package cache : /anaconda3/pkgs 88 /Users/******/.conda/pkgs 89 envs directories : /anaconda3/envs 90 /Users/******/.conda/envs 91 platform : osx-64 92 user-agent : conda/4.5.12 requests/2.18.4 CPython/3.6.8 Darwin/18.6.0 OSX/10.14.5 93 UID:GID : 501:20 94 netrc file : None 95 offline mode : False 96 97 98An unexpected error has occurred. Conda has prepared the above report.
試したこと
インターネットで検索して、PATHを通す、という解決策がでてきたので、~/.zshrc に下記を追加してみましたがだめでした。
vim
1 export PATH="\anaconda3\Library\bin:$PATH"
他にもanacondaに関連しそうなパスがかかれていたので、のせておきます。
vim
1 25 # added by Anaconda3 5.1.0 installer 2 26 export PATH="/Users/******/.pyenv/versions/anaconda3/bin:$PATH" 3 27 4 28 # added by Anaconda3 5.1.0 installer 5 29 export PATH="/anaconda3/bin:$PATH" 6 30 export PYENV_ROOT="$HOME/.pyenv" 7 31 export PATH="$PYENV_ROOT/bin:$PATH" 8 32 eval "$(pyenv init -)" 9 33 autoload -Uz promptinit 10 34 promptinit 11 35 prompt pure
また、
zsh
1$ conda install anaconda
や
zsh
1$ conda search
を試しても同じエラーがでます。
補足情報(FW/ツールのバージョンなど)
パソコン環境は以下の通りです。
・macOS mojave (10.14.5(18F132))
・Python 3.6.8 :: Anaconda, Inc.
・Anaconda (anaconda Command line client (version 1.6.9))
あなたの回答
tips
プレビュー