我正在尝试通过官方source的bash脚本安装miniconda。我已按照所有正式指示进行了双重检查,并通过bash安装了miniconda 3的现有信息。
我一直收到有关区域设置的错误;
tar: Failed to set default locale
tar: Failed to set default locale
installing: python-3.6.5-hc167b69_0 ...
tar: Failed to set default locale
Python 3.6.5 :: Anaconda, Inc.
installing: ca-certificates-2018.03.07-0 ...
tar: Failed to set default locale
installing: conda-env-2.6.0-h36134e3_0 ...
tar: Failed to set default locale
installing: libcxxabi-4.0.1-hebd6815_0 ...
tar: Failed to set default locale
installing: tk-8.6.7-h35a86e2_3 ...
tar: Failed to set default locale
installing: xz-5.2.3-h727817e_4 ...
tar: Failed to set default locale
installing: yaml-0.1.7-hc338f04_2 ...
tar: Failed to set default locale
installing: zlib-1.2.11-hf3cbc9b_2 ...
tar: Failed to set default locale
installing: libcxx-4.0.1-h579ed51_0 ...
tar: Failed to set default locale
installing: openssl-1.0.2o-h26aff7b_0 ...
tar: Failed to set default locale
installing: libffi-3.2.1-h475c297_4 ...
tar: Failed to set default locale
installing: ncurses-6.0-hd04f020_2 ...
tar: Failed to set default locale
installing: libedit-3.1-hb4e282d_0 ...
tar: Failed to set default locale
installing: readline-7.0-hc1231fa_4 ...
tar: Failed to set default locale
installing: sqlite-3.23.1-hf1716c9_0 ...
tar: Failed to set default locale
installing: asn1crypto-0.24.0-py36_0 ...
tar: Failed to set default locale
installing: certifi-2018.4.16-py36_0 ...
tar: Failed to set default locale
installing: chardet-3.0.4-py36h96c241c_1 ...
tar: Failed to set default locale
installing: idna-2.6-py36h8628d0a_1 ...
tar: Failed to set default locale
installing: pycosat-0.6.3-py36hee92d8f_0 ...
tar: Failed to set default locale
installing: pycparser-2.18-py36h724b2fc_1 ...
tar: Failed to set default locale
installing: pysocks-1.6.8-py36_0 ...
tar: Failed to set default locale
installing: python.app-2-py36_8 ...
tar: Failed to set default locale
installing: ruamel_yaml-0.15.35-py36h1de35cc_1 ...
tar: Failed to set default locale
installing: six-1.11.0-py36h0e22d5e_1 ...
tar: Failed to set default locale
installing: cffi-1.11.5-py36h342bebf_0 ...
tar: Failed to set default locale
installing: setuptools-39.0.1-py36_0 ...
tar: Failed to set default locale
installing: cryptography-2.2.2-py36h1de35cc_0 ...
tar: Failed to set default locale
installing: wheel-0.31.0-py36_0 ...
tar: Failed to set default locale
installing: pip-9.0.3-py36_0 ...
tar: Failed to set default locale
installing: pyopenssl-17.5.0-py36h51e4350_0 ...
tar: Failed to set default locale
installing: urllib3-1.22-py36h68b9469_0 ...
tar: Failed to set default locale
installing: requests-2.18.4-py36h4516966_1 ...
tar: Failed to set default locale
installing: conda-4.5.1-py36_0 ...
tar: Failed to set default locale
installation finished.
如果有帮助,我的默认语言环境设置为export LC_ALL="en_US.UTF-8"export PATH="/usr/local/sbin:$PATH"
。
这是我的bash_profile内容:
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/sbin:$PATH"
这是我的区域设置:
LANG="en_US.UTF-8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
如何修复此错误并在Mac上安装miniconda3?提前致谢。
答案 0 :(得分:3)
看起来错误可能在这里:
https://conda.io/docs/user-guide/troubleshooting.html#macos-error-valueerror-unknown-locale-utf-8 https://blog.remibergsma.com/2012/07/10/setting-locales-correctly-on-mac-osx-terminal-application/
仅供参考:我在运行Sierra的Mac OS上下载了Link,并运行了2.7 bash install,绝对没有问题。
$ cd Downloads
$ chmod a+x ./Miniconda2-latest-MacOSX-x86_64.sh
$ ./Miniconda2-latest-MacOSX-x86_64.sh
Welcome to Miniconda2 4.5.1
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
===================================
Miniconda End User License Agreement
===================================
Copyright 2015, Anaconda, Inc.
>>>
Please answer 'yes' or 'no':'
>>> yes
Miniconda2 will now be installed into this location:
/Users/it/miniconda2
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/Users/it/miniconda2] >>>
PREFIX=/Users/it/miniconda2
installing: python-2.7.14-h138c1fe_31 ...
Python 2.7.14 :: Anaconda, Inc.
installing: ca-certificates-2018.03.07-0 ...
installing: conda-env-2.6.0-h36134e3_0 ...
installing: libcxxabi-4.0.1-hebd6815_0 ...
installing: tk-8.6.7-h35a86e2_3 ...
installing: yaml-0.1.7-hc338f04_2 ...
installing: zlib-1.2.11-hf3cbc9b_2 ...
installing: libcxx-4.0.1-h579ed51_0 ...
installing: openssl-1.0.2o-h26aff7b_0 ...
installing: libffi-3.2.1-h475c297_4 ...
installing: ncurses-6.0-hd04f020_2 ...
installing: libedit-3.1-hb4e282d_0 ...
installing: readline-7.0-hc1231fa_4 ...
installing: sqlite-3.23.1-hf1716c9_0 ...
installing: asn1crypto-0.24.0-py27_0 ...
installing: certifi-2018.4.16-py27_0 ...
installing: chardet-3.0.4-py27h2842e91_1 ...
installing: enum34-1.1.6-py27hf475452_1 ...
installing: futures-3.2.0-py27h1b80678_0 ...
installing: idna-2.6-py27hedea723_1 ...
installing: ipaddress-1.0.22-py27_0 ...
installing: pycosat-0.6.3-py27h6c51c7e_0 ...
installing: pycparser-2.18-py27h0d28d88_1 ...
installing: pysocks-1.6.8-py27_0 ...
installing: python.app-2-py27hf2d5e94_7 ...
installing: ruamel_yaml-0.15.35-py27h1de35cc_1 ...
installing: six-1.11.0-py27h7252ba3_1 ...
installing: cffi-1.11.5-py27h342bebf_0 ...
installing: setuptools-39.0.1-py27_0 ...
installing: cryptography-2.2.2-py27h1de35cc_0 ...
installing: wheel-0.31.0-py27_0 ...
installing: pip-9.0.3-py27_0 ...
installing: pyopenssl-17.5.0-py27hfda213f_0 ...
installing: urllib3-1.22-py27hc3787e9_0 ...
installing: requests-2.18.4-py27h9b2b37c_1 ...
installing: conda-4.5.1-py27_0 ...
installation finished.
Do you wish the installer to prepend the Miniconda2 install location
to PATH in your /Users/it/.bash_profile ? [yes|no]
[yes] >>> yes
Appending source /Users/it/miniconda2/bin/activate in
newly created /Users/it/.bash_profile
For this change to become active, you have to open a new terminal.
Thank you for installing Miniconda2!
我的区域设置:
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=