question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv sync fails without Pipfile present

See original GitHub issue
Issue description

Running pipenv sync without a Pipfile present (the Pipfile.lock is there) fails with the message

Error: Pipfile.lock is missing! You need to run $ pipenv lock first.
Expected result

I would expect the Pipfile not to be needed at all for sync since it should just install the pinned versions from the Pipfile.lock

Actual result

pipenv won’t install anything because it either thinks it needs a Pipfile as well as a Pipfile.lock for some reason. It also complains about the wrong file (Pipenv.lock).

Steps to replicate
  • Create a new virtualenv, e.g with pipenv install requests
  • Remove the Pipfile (keeping only the Pipfile.lock)
  • Run pipenv sync

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7'

Other Python installations in PATH:

  • 2.7: /usr/local/bin/python2.7

  • 2.7: /usr/local/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/local/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.7: /usr/local/bin/python3.7m

  • 3.7: /usr/local/bin/python3.7

  • 3.7: /usr/local/bin/python3.7

  • 2.7.15: /usr/local/bin/python

  • 2.7.10: /usr/bin/python

  • 2.7.15: /usr/local/bin/python

  • 2.7.10: /usr/bin/python

  • 2.7.15: /usr/local/bin/python2

  • 2.7.15: /usr/local/bin/python2

  • 3.7.0: /usr/local/bin/python3

  • 3.7.0: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT '
                     '2018; root:xnu-4570.51.2~1/RELEASE_X86_64',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • TERM_PROGRAM
  • SHELL
  • TERM
  • TMPDIR
  • PIPENV_VENV_IN_PROJECT
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • LC_ALL
  • USER
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • LSCOLORS
  • _
  • PWD
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • COLORFGBG
  • HOME
  • SHLVL
  • ITERM_SESSION_ID
  • LOGNAME
  • LC_CTYPE
  • GOPATH
  • DISPLAY
  • COLORTERM
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: 1

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2018.7.1/libexec/tools:/Users/ulrjoh2/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/opt/go/libexec/bin:/Users/ulrjoh2/work/bin:/Users/ulrjoh2/.local/bin:/Users/ulrjoh2/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/opt/go/libexec/bin:/Users/ulrjoh2/work/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /tmp/test

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Sep 29, 2020

This is open.

0reactions
frostmingcommented, Nov 14, 2020

Sure thing, thank you for following up

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Pipenv Errors and How to Solve Them
Pipfile won't lock when it tries to install packages that don't exist, i.e., typos. ... Pipenv looks for the package you specify, whether...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
☤ Pipenv does not respect dependencies in setup.py​​ Pipfile and setup.py serve different purposes, and should not consider each other by default. See...
Read more >
pipenv install --ignore-pipfile creates a Pipfile with no ...
I want to move the program to another environment, eg A to B. At A, I first issue pipenv lock to update the...
Read more >
pipenv Documentation
dependencies, see Pipfile vs setup.py. The problems that Pipenv seeks to solve are multi-faceted: • You no longer need to use pip and...
Read more >
pipenv Changelog
Fix regression where ``path`` is not propagated to the ``Pipfile.lock``. ... Fix regression: pipenv does not sync indexes to lockfile.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found