pipenv
pipenv copied to clipboard
Errors are unreadable
Whenever pipenv runs into an issue, it just results in a massive stacktrace being shown in the console. Making it hard to figure out the real issue, even more so for inexperienced users.
This is an example error (the error isn't the bug I'm reporting, it's the fact that the error is unreadable)
Pipfile.lock (48dc67) out of date, updating to (cfb59b)...
Locking [packages] dependencies...
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
Locking Failed!
[=== ] Locking...False
ERROR:pip.subprocessor:python setup.py egg_info exited with 1
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\resolver.py", line 645, in _main
[ResolutionFailure]: resolve_packages(
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\resolver.py", line 612, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\resolver.py", line 592, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\utils\resolver.py", line 918, in resolve_deps
[ResolutionFailure]: results, hashes, internal_resolver = actually_resolve_deps(
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\utils\resolver.py", line 691, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\utils\resolver.py", line 448, in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: metadata generation failed
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Scripts\pipenv.exe\__main__.py", line 7, in <module>
# when invoked as python -m pip <command>
^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\cli\options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\vendor\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\cli\command.py", line 209, in install
do_install(
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\routines\install.py", line 164, in do_install
do_init(
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\routines\install.py", line 648, in do_init
do_lock(
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\routines\lock.py", line 65, in do_lock
venv_resolve_deps(
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\utils\resolver.py", line 859, in venv_resolve_deps
c = resolve(cmd, st, project=project)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Robbe\AppData\Local\Programs\Python\Python312\Lib\site-packages\pipenv\utils\resolver.py", line 728, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!