title: Problems with entrypoints (from other packages) when installing package through pip
body: <p>Trying to install a package, for example, <code>pytorch</code> </p>
  
  <p><code>pip install torch</code> / <code>pip install -U torch</code></p>
  
  <p>And I'm greeted with this</p>
  
  <pre><code>Collecting torch
    Using cached torch-0.1.2.post2.tar.gz (128 kB)
      ERROR: Command errored out with exit status 1:
       command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-35x5kco9\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-35x5kco9\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aissy\AppData\Local\Temp\pip-install-35x5kco9\torch\pip-egg-info'
           cwd: C:\Users\aissy\AppData\Local\Temp\pip-install-35x5kco9\torch\
      Complete output (30 lines):
      Traceback (most recent call last):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2811, in get_entry_map
          ep_map = self._ep_map
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2769, in __getattr__
          raise AttributeError(attr)
      AttributeError: _ep_map
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "C:\Users\aissy\AppData\Local\Temp\pip-install-35x5kco9\torch\setup.py", line 265, in &lt;module&gt;
          description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 144, in setup
          _install_setup_requires(attrs)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 133, in _install_setup_requires
          (k, v) for k, v in attrs.items()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\dist.py", line 444, in __init__
          for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 656, in &lt;genexpr&gt;
          for entry in dist.get_entry_map(group).values()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2814, in get_entry_map
          self._get_metadata('entry_points.txt'), self
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2516, in parse_map
          maps[group] = cls.parse_group(group, lines, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2494, in parse_group
          ep = cls.parse(line, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2472, in parse
          raise ValueError(msg, src)
      ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format but got this instead json-server=json-server.cli:main", 'json-server=json-server.cli:main')
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  PS C:\Windows\system32&gt; py -m pip install -u nltk                                                                                         
  Usage:
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip install [options] &lt;requirement specifier&gt; [package-index-options] ...
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip install [options] -r &lt;requirements file&gt; [package-index-options] ...
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip install [options] [-e] &lt;vcs project url&gt; ...
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip install [options] [-e] &lt;local project path&gt; ...
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip install [options] &lt;archive url/path&gt; ...
  
  no such option: -u
  PS C:\Windows\system32&gt; py -m pip install -U nltk                                                                                         Collecting nltk
    Using cached nltk-3.5.zip (1.4 MB)
      ERROR: Command errored out with exit status 1:
       command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-d1oaxx5q\\nltk\\setup.py'"'"'; __file__='"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-d1oaxx5q\\nltk\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aissy\AppData\Local\Temp\pip-install-d1oaxx5q\nltk\pip-egg-info'
           cwd: C:\Users\aissy\AppData\Local\Temp\pip-install-d1oaxx5q\nltk\
      Complete output (30 lines):
      Traceback (most recent call last):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2811, in get_entry_map
          ep_map = self._ep_map
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2769, in __getattr__
          raise AttributeError(attr)
      AttributeError: _ep_map
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "C:\Users\aissy\AppData\Local\Temp\pip-install-d1oaxx5q\nltk\setup.py", line 112, in &lt;module&gt;
          entry_points=console_scripts,
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 144, in setup
          _install_setup_requires(attrs)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 133, in _install_setup_requires
          (k, v) for k, v in attrs.items()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\dist.py", line 444, in __init__
          for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 656, in &lt;genexpr&gt;
          for entry in dist.get_entry_map(group).values()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2814, in get_entry_map
          self._get_metadata('entry_points.txt'), self
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2516, in parse_map
          maps[group] = cls.parse_group(group, lines, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2494, in parse_group
          ep = cls.parse(line, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2472, in parse
          raise ValueError(msg, src)
      ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format but got this instead json-server=json-server.cli:main", 'json-server=json-server.cli:main')
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  PS C:\Windows\system32&gt; py -m pip install pip                                                                                             Requirement already satisfied: pip in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (20.0.2)
  PS C:\Windows\system32&gt; py -m pip install pip==20.0.1                                                                                     Collecting pip==20.0.1
    Using cached pip-20.0.1-py2.py3-none-any.whl (1.5 MB)
  Installing collected packages: pip
    Attempting uninstall: pip
      Found existing installation: pip 20.0.2
      Uninstalling pip-20.0.2:
        Successfully uninstalled pip-20.0.2
    WARNING: The scripts pip.exe, pip3.7.exe and pip3.exe are installed in 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts' which is not on PATH.
    Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Successfully installed pip-20.0.1
  PS C:\Windows\system32&gt; py -m pip install pip==20.0.2                                                                                     Collecting pip==20.0.2
    Using cached pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
  Installing collected packages: pip
    Attempting uninstall: pip
      Found existing installation: pip 20.0.1
      Uninstalling pip-20.0.1:
        Successfully uninstalled pip-20.0.1
    WARNING: The scripts pip.exe, pip3.7.exe and pip3.exe are installed in 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts' which is not on PATH.
    Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Successfully installed pip-20.0.2
  PS C:\Windows\system32&gt; py -m pip install torch                                                                                           Collecting torch
    Using cached torch-0.1.2.post2.tar.gz (128 kB)
      ERROR: Command errored out with exit status 1:
       command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-1ii8iy6m\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-1ii8iy6m\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aissy\AppData\Local\Temp\pip-install-1ii8iy6m\torch\pip-egg-info'
           cwd: C:\Users\aissy\AppData\Local\Temp\pip-install-1ii8iy6m\torch\
      Complete output (30 lines):
      Traceback (most recent call last):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2811, in get_entry_map
          ep_map = self._ep_map
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2769, in __getattr__
          raise AttributeError(attr)
      AttributeError: _ep_map
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "C:\Users\aissy\AppData\Local\Temp\pip-install-1ii8iy6m\torch\setup.py", line 265, in &lt;module&gt;
          description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 144, in setup
          _install_setup_requires(attrs)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\__init__.py", line 133, in _install_setup_requires
          (k, v) for k, v in attrs.items()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\setuptools\dist.py", line 444, in __init__
          for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 656, in &lt;genexpr&gt;
          for entry in dist.get_entry_map(group).values()
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2814, in get_entry_map
          self._get_metadata('entry_points.txt'), self
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2516, in parse_map
          maps[group] = cls.parse_group(group, lines, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2494, in parse_group
          ep = cls.parse(line, dist)
        File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pkg_resources\__init__.py", line 2472, in parse
          raise ValueError(msg, src)
      ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format but got this instead json-server=json-server.cli:main", 'json-server=json-server.cli:main')
      -----------------------------------------
  
  </code></pre>
  
  <p>As what I believe <code>json-server</code>'s Entrypoint is causing the issue. As far as I'm aware, <code>json-server</code> is not a python package but a CLI tool. </p>
  
  <p>I'm assuming the <code>-</code> in <code>json-server=json-server.cli:main</code> as from what I read from this <a href="https://stackoverflow.com/questions/30283929/why-do-i-keep-getting-this-message-when-installing-saying-entrypoint-must-be-in">post</a></p>
  
  <p>What can I do about it?</p>