You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pipenv fails to run when only having Pipfile.lock. I am doing the process I described in #2489 (comment) and, and if I remove the touch Pipfile step, it will not work.
Expected result
pipenv sync should not depend on having Pipfile
Actual result
pipenv sync fails if Pipfile doesn't exist
Steps to replicate
Go to any pipenv project you may have and run the following
$ echo 'FROM python:alpine
RUN pip install pipenv
COPY Pipfile.lock .
RUN pipenv sync --verbose
' > test.dockerfile
$ docker build --file test.dockerfile .
Sending build context to Docker daemon 148.5kB
Step 1/4 : FROM python:alpine
---> 408808fb1a9e
Step 2/4 : RUN pip install pipenv
---> Using cache
---> 8d746c715b6a
Step 3/4 : COPY Pipfile.lock .
---> Using cache
---> 276d433c16bf
Step 4/4 : RUN pipenv sync --verbose
---> Running in 458c40362331
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 615, in sync
pypi_mirror=state.pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 2589, in do_sync
raise exceptions.LockfileNotFound("Pipfile.lock")
pipenv.exceptions.LockfileNotFound: ERROR: Pipfile.lock not found! You need to run $ pipenv lock before you can continue.
The command '/bin/sh -c pipenv sync --verbose' returned a non-zero code: 1
Sorry for the issues, this is fixed on master however (and tells you that pipenv should not run in the root directory)
It works fine against master with the following dockerfile:
FROM python:alpine
# Copy over a wheel built against master
COPY pipenv-2018.11.27.dev0-py3-none-any.whl .
RUN pip install pipenv-2018.11.27.dev0-py3-none-any.whl
RUN mkdir -p app
WORKDIR app
COPY Pipfile.lock .
RUN pipenv sync --verbose
Issue description
Pipenv fails to run when only having Pipfile.lock. I am doing the process I described in #2489 (comment) and, and if I remove the
touch Pipfile
step, it will not work.Expected result
pipenv sync
should not depend on havingPipfile
Actual result
pipenv sync
fails ifPipfile
doesn't existSteps to replicate
Go to any pipenv project you may have and run the following
$ pipenv --support
Pipenv version:
'2018.11.26'
Pipenv location:
'/usr/local/lib/python3.7/site-packages/pipenv'
Python location:
'/usr/local/bin/python'
Python installations found:
3.7.1
:/usr/local/bin/python
3.7.1
:/usr/local/bin/python3.7m
2.7.15
:/usr/bin/python
PEP 508 Information:
System environment variables:
HOSTNAME
PYTHON_PIP_VERSION
SHLVL
HOME
GPG_KEY
PATH
LANG
TERRAFORM_VERSION
PYTHON_VERSION
PWD
CLOUD_SDK_VERSION
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/google-cloud-sdk/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG
:C.UTF-8
PWD
:/usr/local/src/ki
The text was updated successfully, but these errors were encountered: