Repository: pypa/pip

Issue:
Misleading pip install error message
* Pip version: 10.0.1
* Python version: 3.6.4
* Operating system: macOS Sierra 10.12.6

### Description:

Installing a package using with the missing trailing comma on `install_requires` in setup.py setup() returns an error informing the pip user that there are no files in a path that actually does have files.

Adding back in the missing trailing comma fixes the problem, but I think this error is very misleading. 

I suggest:
```
Could not find files/directors in /Users/dyspop/Code/python/package (from PKG-INFO)
```

Saying you can't find something is a bit more helpful than saying there is nothing to be found.

### What I've run:
```
$ pip install -e .
Obtaining file:///Users/dyspop/Code/python/package
No files/directories in /Users/dyspop/Code/python/package (from PKG-INFO)
```

setup.py
```
from setuptools import find_packages, setup

setup(
	name='flaskr',
	version='1.0.0',
	packages=find_packages(),
	include_package_data=True,
	zip_safe=False,
	install_requires=[
		'flask'
	]
)
```


Discussion:
Hi @dyspop!

It seems there is something else going on here since your example works well for me.

```
$ pip install -e .
Obtaining file:///Users/pradyunsg/.venvwrap/venvs/tmp-4254b4d9d195bb0
Collecting flask (from flaskr==1.0.0)
  Downloading https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl (91kB)
    100% |████████████████████████████████| 92kB 555kB/s
Collecting itsdangerous>=0.24 (from flask->flaskr==1.0.0)
  Downloading https://files.pythonhosted.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 3.2MB/s
Collecting Werkzeug>=0.14 (from flask->flaskr==1.0.0)
  Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 2.2MB/s
Collecting click>=5.1 (from flask->flaskr==1.0.0)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting Jinja2>=2.10 (from flask->flaskr==1.0.0)
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask->flaskr==1.0.0)
Building wheels for collected packages: itsdangerous
  Running setup.py bdist_wheel for itsdangerous ... done
  Stored in directory: /Users/pradyunsg/Library/Caches/pip/wheels/2c/4a/61/5599631c1554768c6290b08c02c72d7317910374ca602ff1e5
Successfully built itsdangerous
Installing collected packages: itsdangerous, Werkzeug, click, MarkupSafe, Jinja2, flask, flaskr
  Running setup.py develop for flaskr
Successfully installed Jinja2-2.10 MarkupSafe-1.0 Werkzeug-0.14.1 click-6.7 flask-1.0.2 flaskr itsdangerous-0.24
```
Pinging @dyspop; could you provide a reproduction case?
Hi. I'm not sure this was addressed properly? The problem isn't whether it runs or not, it's the error message being unhelpful. What would a reproduction case look like? A package with this issue present?
I didn't understand what this issue is filed for. Are you suggesting changing the following:

https://github.com/pypa/pip/blob/6533f883f6b856eb441768b25a84752942773f90/src/pip/_internal/req/req_install.py#L563

To:

```py
'Could not find files/directories in %s (from %s)' % (base, filename)
```

That seems good. Are you looking for a PR?
Sure. Happy to accept a PR for this. :)

Resolving patch:
diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
--- a/src/pip/_internal/req/req_install.py
+++ b/src/pip/_internal/req/req_install.py
@@ -560,11 +560,9 @@ def egg_info_path(self, filename):
 
             if not filenames:
                 raise InstallationError(
-                    'No files/directories in %s (from %s)' % (base, filename)
+                    "Files/directories (from %s) not found in %s"
+                    % (filename, base)
                 )
-            assert filenames, \
-                "No files/directories in %s (from %s)" % (base, filename)
-
             # if we have more than one match, we pick the toplevel one.  This
             # can easily be the case if there is a dist folder which contains
             # an extracted tarball for testing purposes.


Test patch: