Anaconda:ImportError:无法导入名称InsecureRequestWarning

时间:2017-03-31 04:13:14

标签: python anaconda

我正在尝试使用git-bash和win10创建一个conda环境:

$ conda create --name my_env
An unexpected error has occurred.

Traceback (most recent call last):
  File "c:\Miniconda2\Scripts\conda-script.py", line 5, in <module>
    sys.exit(conda.cli.main())
  File "c:\Miniconda2\lib\site-packages\conda\cli\main.py", line 164, in main
    return conda_exception_handler(_main, *args)
  File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 607, in conda_exception_handler
    print_unexpected_error_message(e)
  File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 561, in print_unexpected_error_message
    info_stdout, info_stderr = get_info()
  File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 531, in get_info
    args.func(args, p)
  File "c:\Miniconda2\lib\site-packages\conda\cli\main_info.py", line 142, in execute
    from conda.api import get_index
  File "c:\Miniconda2\lib\site-packages\conda\api.py", line 1, in <module>
    from .core.index import get_index
  File "c:\Miniconda2\lib\site-packages\conda\core\index.py", line 9, in <module>
    from .repodata import collect_all_repodata
  File "c:\Miniconda2\lib\site-packages\conda\core\repodata.py", line 22, in <module>
    from requests.packages.urllib3.exceptions import InsecureRequestWarning
ImportError: cannot import name InsecureRequestWarning

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

试试这个

pip install -U requests