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 creates empty Pipfile in some folders

See original GitHub issue

Issue description

Empty Pipfile are created from time to time in some folders of my app. They always appear in the same folders, and it seems that they appear when I have opened a file in the same directory in Vim. They can appear in 9 different locations at time of writing.

Expected result

pipenv should not create those empty files.

Actual result

Example paths:

api/repo/column/Pipfile
api/lib/sqs_task/Pipfile
api/tests/factory/Pipfile

The only thing they seem to have in common is that they are 3 layers deep.

Steps to replicate

Actually, I really don’t know how to replicate this and would appreciate some guidance. Since it seems to happen only when I’m working on the files, could it be related to my editing setup? I’m using:


$ pipenv --support

NOTE: I have redacted the areas I assume are irrelevant.

Pipenv version: '2018.11.26'

Pipenv location: '/Users/ca/Library/Python/3.7/lib/python/site-packages/pipenv'

Python location: '/usr/local/opt/python/bin/python3.7'

Python installations found:

  • 3.7.4: /usr/local/bin/python3
  • 3.7.4: /usr/local/bin/python3.7m
  • 2.7.16: /usr/local/bin/python
  • 2.7.16: /usr/local/bin/pythonw
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.4',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '18.7.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT '
                     '2019; root:xnu-4903.270.47~4/RELEASE_X86_64',
 'python_full_version': '3.7.4',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_SESSION_ID
  • LC_TERMINAL_VERSION
  • COLORFGBG
  • XPC_FLAGS
  • PWD
  • SHELL
  • LC_CTYPE
  • TERM_PROGRAM_VERSION
  • TERM_PROGRAM
  • PATH
  • LC_TERMINAL
  • COLORTERM
  • TERM
  • HOME
  • TMPDIR
  • USER
  • LOGNAME
  • SHLVL
  • OLDPWD
  • ZSH
  • EDITOR
  • EDITOR_GUI
  • CODE_PATH
  • FORK_PATH
  • GOPATH
  • VIM_DOTFILES
  • PYENV_ROOT
  • MANPATH
  • DOTFILES
  • VIRTUAL_ENV_DISABLE_PROMPT
  • PROMPT
  • 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: /Users/ca/.pyenv/bin:/usr/local/opt/gettext/bin:/usr/local/bin:/usr/local/sbin:/Users/ca/.dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/ca/bin:/Users/ca/Library/Python/3.7/bin:/Users/ca/.local/bin
  • SHELL: /usr/local/bin/zsh
  • EDITOR: nvim
  • LANG: en_US.UTF-8
  • PWD: [redacted]/api

Contents of Pipfile (‘[redacted]/api/Pipfile’):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
[redacted]

[dev-packages]
[redacted]

[requires]
python_version = "3.6"

Contents of Pipfile.lock (‘[redacted]/api/Pipfile.lock’):

{
    "_meta": {
        "hash": {
            "sha256": "558646c3fe87a703b88b2e80732264a2e1c4b93854d79f2cd969b26f88dc180e"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
   [redacted]
}

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ionlingcommented, Aug 26, 2019

Same with Emacs pipenv.el

0reactions
ghostcommented, Sep 10, 2019

That’s fine. I was trying to understand the design decisions behind why pipenv only searches within 3 depth. thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"pipenv install" in empty directory doesn't create a Pipfile, but ...
Use the PIPENV_NO_INHERIT environment variable to ignore inheriting from directories above the current directory, e.g.,
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
Here are some common questions people have using Pipenv. ... If you're confident they are, you may need to clear your resolver cache....
Read more >
Configure a Pipenv environment | IntelliJ IDEA Documentation
Pipenv also generates the Pipfile.lock file, which is used to produce ... To use Pipenv with IntelliJ IDEA, you need to implement several...
Read more >
pipenv Documentation - manpages.ubuntu!
It also generates the ever–important Pipfile.lock, which is used to produce ... just an empty directory for this tutorial) and run: $ cd...
Read more >
Pipenv & Virtual Environments
Pipenv will install the excellent Requests library and create a Pipfile for you ... Python environments. virtualenv creates a folder which contains all...
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