Unhelpful message if local package build (setup.py egg_info) fails with underlying exception
See original GitHub issueAll of the below is using master, checked out at 0fa7bd8bd9be0c64dd14d6c8421b617651d3745d.
Running pipenv lock
for a Pipfile that imports a setup.py with a setup_requires
dependency fails with a TypeError: __init__() got an unexpected keyword argument 'download_dir'
error.
$ python -m pipenv.help output
Pipenv version: '2018.05.18'
Pipenv location: '/Users/greysteil/code/pipenv/pipenv'
Python location: '/usr/local/opt/python/bin/python3.6'
Other Python installations in PATH
:
-
2.6
:/usr/bin/python2.6
-
2.6
:/usr/bin/python2.6
-
2.7
:/usr/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/usr/local/bin/python3.6m
-
3.6
:/usr/local/bin/python3.6
-
3.6
:/usr/local/bin/python3.6
-
3.6.5
:/usr/local/bin/python
-
3.6.5
:/usr/local/bin/python
-
2.7.10
:/usr/bin/python
-
3.6.5
:/usr/local/bin/python3
-
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '16.7.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST '
'2018; root:xnu-3789.73.11~1/RELEASE_X86_64',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
TERM_PROGRAM
PYENV_ROOT
TERM
SHELL
CLICOLOR
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
TERM_SESSION_ID
USER
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
LSCOLORS
PATH
PWD
EDITOR
LANG
XPC_FLAGS
RBENV_SHELL
XPC_SERVICE_NAME
HOME
SHLVL
LOGNAME
OLDPWD
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/greysteil/.pyenv/bin:/Users/greysteil/.cargo/bin:/usr/local/heroku/bin:/Users/greysteil/.rbenv/shims:/usr/local/bin:./node_modules/.bin:.bundle/binstubs:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Library/TeX/texbin:/usr/local/sbin
SHELL
:/bin/bash
EDITOR
:subl -w
LANG
:en_GB.UTF-8
PWD
:/Users/greysteil/code/python-test
Contents of Pipfile
(‘/Users/greysteil/code/python-test/Pipfile’):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
"e1839a8" = {path = ".", editable = true}
Expected result
Install should succeed
Actual result
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.org/simple
ROUND 1
Current constraints:
file:///Users/greysteil/code/python-test (from -r /var/folders/kv/y02nj9zd5ss16sn505tk6g_40000gn/T/pipenv-hs7ym9sw-requirements/pipenv-0igg_jkv-constraints.txt (line 2))
Finding the best candidates:
found candidate -e file:///Users/greysteil/code/python-test (constraint was <any>)
Finding secondary dependencies:
INFO:notpip._internal.operations.prepare:Obtaining file:///Users/greysteil/code/python-test (from -r /var/folders/kv/y02nj9zd5ss16sn505tk6g_40000gn/T/pipenv-hs7ym9sw-requirements/pipenv-0igg_jkv-constraints.txt (line 2))
Traceback (most recent call last):
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/repositories/pypi.py", line 305, in get_legacy_dependencies
wheel_cache=self.wheel_cache,
TypeError: __init__() got an unexpected keyword argument 'download_dir'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/greysteil/code/pipenv/pipenv/resolver.py", line 84, in <module>
main()
File "/Users/greysteil/code/pipenv/pipenv/resolver.py", line 73, in main
system=system,
File "/Users/greysteil/code/pipenv/pipenv/resolver.py", line 64, in resolve
allow_global=system,
File "/Users/greysteil/code/pipenv/pipenv/utils.py", line 403, in resolve_deps
req_dir=req_dir,
File "/Users/greysteil/code/pipenv/pipenv/utils.py", line 295, in actually_resolve_deps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/resolver.py", line 104, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/resolver.py", line 204, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/resolver.py", line 278, in _iter_dependencies
for dependency in self.repository.get_dependencies(ireq):
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/repositories/pypi.py", line 246, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/repositories/pypi.py", line 339, in get_legacy_dependencies
self.resolver.resolve(reqset)
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/resolve.py", line 107, in resolve
self._resolve_one(requirement_set, req)
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/resolve.py", line 264, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/resolve.py", line 198, in _get_abstract_dist_for
req, self.require_hashes, self.use_user_site, self.finder,
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/operations/prepare.py", line 354, in prepare_editable_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/operations/prepare.py", line 155, in prep_for_dist
self.req.run_egg_info()
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/req/req_install.py", line 486, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_internal/utils/misc.py", line 698, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /Users/greysteil/code/python-test/
Steps to replicate
Run pipenv lock
in a directory with the following:
# Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
"e1839a8" = {path = ".", editable = true}
# setup.py
import setuptools
def _main():
setuptools.setup(
packages=setuptools.find_packages(),
setup_requires=['pbr'],
pbr=True)
if __name__ == "__main__":
_main()
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
--verbose
does not help. I still see only this and no other error information:I don’t have any issues installing that library with
pip
.I’m still getting unhelpful errors when there is an installation failure (in my case, a new cftime release was failing because they didn’t upload a wheel and I was missing Cython). Any way to enable the debugging?