Repository: conda/conda

Issue:
conda navigator install
Install attempt on a Windows 10 machine

From the command prompt:
```
C:\Users\rbaer>conda install anaconda-navigator
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues



Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\requests\packages\__init__.py", line 27, in <module>
    from . import urllib3
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\__init__.py", line 8, in <module>
    from .connectionpool import (
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 28, in <module>
    from .packages.six.moves.queue import LifoQueue, Empty, Full
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 203, in load_module
    mod = mod._resolve()
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 82, in _import_module
    __import__(name)
  File "C:\MHPY3-GIT\makehuman\lib\queue.py", line 40, in <module>
    from PyQt4 import QtCore
ModuleNotFoundError: No module named 'PyQt4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\conda\exceptions.py", line 617, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "C:\Anaconda\lib\site-packages\conda\cli\main.py", line 92, in _main
    p, sub_parsers = generate_parser()
  File "C:\Anaconda\lib\site-packages\conda\cli\main.py", line 51, in generate_parser
    from ..cli import conda_argparse
  File "C:\Anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 15, in <module>
    from .common import add_parser_help
  File "C:\Anaconda\lib\site-packages\conda\cli\common.py", line 19, in <module>
    from ..core.linked_data import linked_data
  File "C:\Anaconda\lib\site-packages\conda\core\linked_data.py", line 11, in <module>
    from ..gateways.disk.delete import rm_rf
  File "C:\Anaconda\lib\site-packages\conda\gateways\disk\delete.py", line 14, in <module>
    from .read import get_json_content
  File "C:\Anaconda\lib\site-packages\conda\gateways\disk\read.py", line 20, in <module>
    from ...models.channel import Channel
  File "C:\Anaconda\lib\site-packages\conda\models\channel.py", line 6, in <module>
    from requests.packages.urllib3.util import Url
  File "C:\Anaconda\lib\site-packages\requests\__init__.py", line 63, in <module>
    from . import utils
  File "C:\Anaconda\lib\site-packages\requests\utils.py", line 24, in <module>
    from ._internal_utils import to_native_string
  File "C:\Anaconda\lib\site-packages\requests\_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "C:\Anaconda\lib\site-packages\requests\compat.py", line 11, in <module>
    from .packages import chardet
  File "C:\Anaconda\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
    import urllib3
ModuleNotFoundError: No module named 'urllib3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\requests\packages\__init__.py", line 27, in <module>
    from . import urllib3
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\__init__.py", line 8, in <module>
    from .connectionpool import (
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 28, in <module>
    from .packages.six.moves.queue import LifoQueue, Empty, Full
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 203, in load_module
    mod = mod._resolve()
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "C:\Anaconda\lib\site-packages\requests\packages\urllib3\packages\six.py", line 82, in _import_module
    __import__(name)
  File "C:\MHPY3-GIT\makehuman\lib\queue.py", line 40, in <module>
    from PyQt4 import QtCore
ModuleNotFoundError: No module named 'PyQt4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Anaconda\Scripts\conda-script.py", line 5, in <module>
    sys.exit(conda.cli.main())
  File "C:\Anaconda\lib\site-packages\conda\cli\main.py", line 167, in main
    return conda_exception_handler(_main, *args)
  File "C:\Anaconda\lib\site-packages\conda\exceptions.py", line 633, in conda_exception_handler
    print_unexpected_error_message(e)
  File "C:\Anaconda\lib\site-packages\conda\exceptions.py", line 560, in print_unexpected_error_message
    info_stdout, info_stderr = get_info()
  File "C:\Anaconda\lib\site-packages\conda\exceptions.py", line 519, in get_info
    from conda.cli import conda_argparse
  File "C:\Anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 15, in <module>
    from .common import add_parser_help
  File "C:\Anaconda\lib\site-packages\conda\cli\common.py", line 19, in <module>
    from ..core.linked_data import linked_data
  File "C:\Anaconda\lib\site-packages\conda\core\linked_data.py", line 11, in <module>
    from ..gateways.disk.delete import rm_rf
  File "C:\Anaconda\lib\site-packages\conda\gateways\disk\delete.py", line 14, in <module>
    from .read import get_json_content
  File "C:\Anaconda\lib\site-packages\conda\gateways\disk\read.py", line 20, in <module>
    from ...models.channel import Channel
  File "C:\Anaconda\lib\site-packages\conda\models\channel.py", line 6, in <module>
    from requests.packages.urllib3.util import Url
  File "C:\Anaconda\lib\site-packages\requests\__init__.py", line 63, in <module>
    from . import utils
  File "C:\Anaconda\lib\site-packages\requests\utils.py", line 24, in <module>
    from ._internal_utils import to_native_string
  File "C:\Anaconda\lib\site-packages\requests\_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "C:\Anaconda\lib\site-packages\requests\compat.py", line 11, in <module>
    from .packages import chardet
  File "C:\Anaconda\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
    import urllib3
ModuleNotFoundError: No module named 'urllib3'

C:\Users\rbaer>
```


Discussion:
This may or may not help:
```
C:\Users\rbaer>anaconda-navigator
Traceback (most recent call last):
  File "C:\Anaconda\Scripts\anaconda-navigator-script.py", line 5, in <module>
    sys.exit(anaconda_navigator.app.main.main())
  File "C:\Anaconda\lib\site-packages\anaconda_navigator\app\main.py", line 47, in main
    from anaconda_navigator.utils.logs import clean_logs
  File "C:\Anaconda\lib\site-packages\anaconda_navigator\utils\logs.py", line 14, in <module>
    import logging.handlers
  File "C:\Anaconda\lib\logging\handlers.py", line 28, in <module>
    import queue
  File "C:\MHPY3-GIT\makehuman\lib\queue.py", line 40, in <module>
    from PyQt4 import QtCore
ModuleNotFoundError: No module named 'PyQt4'
```
It appears that the requests package somehow got removed from your Anaconda install.  Without requests, conda is pretty much crippled.  You can try to recover with 

    conda install --no-deps requests --offline

but if that fails because not enough information is cached on your system, you'll have to install Miniconda over your current `c:\Anaconda` install to help recover.

Resolving patch:
diff --git a/conda/models/channel.py b/conda/models/channel.py
--- a/conda/models/channel.py
+++ b/conda/models/channel.py
@@ -3,15 +3,14 @@
 
 from itertools import chain
 from logging import getLogger
-from requests.packages.urllib3.util import Url
 
 from ..base.constants import (DEFAULTS_CHANNEL_NAME, DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNELS_WIN,
                               MAX_CHANNEL_PRIORITY, UNKNOWN_CHANNEL)
 from ..base.context import context
 from ..common.compat import ensure_text_type, iteritems, odict, with_metaclass
 from ..common.path import is_path, win_path_backout
-from ..common.url import (has_scheme, is_url, join_url, path_to_url, split_conda_url_easy_parts,
-                          split_scheme_auth_token, urlparse)
+from ..common.url import (Url, has_scheme, is_url, join_url, path_to_url,
+                          split_conda_url_easy_parts, split_scheme_auth_token, urlparse)
 
 try:
     from cytoolz.functoolz import excepts


Test patch: