Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv failed in virtualenv #2957

craynic opened this issue Oct 9, 2018 · 1 comment

pipenv failed in virtualenv #2957

craynic opened this issue Oct 9, 2018 · 1 comment


Copy link

@craynic craynic commented Oct 9, 2018

pipenv, version 2018.10.9

(create a new virtualenv and install pipenv)
$ pipenv install ipython
Installing ipython…
(....something does not matter)
Adding ipython to Pipfile's [packages]…
Pipfile.lock (17b797) out of date, updating to (8fdd10)…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
File "/home/craynic/.virtualenvs/test2/bin/pipenv", line 11, in
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 764, in call
return self.main(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 717, in main
rv = self.invoke(ctx)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 555, in invoke
return callback(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 555, in invoke
return callback(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/cli/", line 249, in install
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/", line 1950, in do_install
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/", line 1242, in do_init
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/", line 1034, in do_lock
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/", line 355, in venv_resolve_deps
escape_grouped_arguments(which("python", allow_global=allow_global)),
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/", line 109, in which
if not location and os.path.exists(location):
File "/home/craynic/.virtualenvs/test2/lib/python3.7/", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Copy link

@techalchemy techalchemy commented Oct 9, 2018

Thanks for the report, the logic there is pretty straightforwardly flawed:

if not location and os.path.exists(location): can never actually evaluate without failing

sorry for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants