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 will pollute my filesystem with Pipfiles

See original GitHub issue
Is your feature request related to a problem? Please describe.

We have started using pipenv in our project and its great. But it has a tendency to pollute my filesystem with Pipfiles if I do not pay close attention to where I am issuing my commands.

If I am in a directory whose parents do not have Pipfiles, pipenv will simply create a new one no matter what command I issue. This is contrary to what I would expect and definitely contrary to other tools do such as git.

Describe the solution you’d like

For instance git will not start a git repo because I simply issued git status on a non-tracked directory, rather it issues an error:

fatal: not a git repository (or any of the parent directories): .git

Now I would expect pipenv to do something similar and only create a Pipfile once I initialise a given repository.

Second and related to the above problem, git has a very useful option git -C <path> which will run as if git was started in path instead of the current working directory. Although pipenv has the PIPENV_PIPFILE, it is not as useful and concise as -C. See a related discussion about git in here.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Aug 8, 2018

A good way to approach this would be to lay out stages a project should go through from uninitialised (say, a fresh git clone) to fully ready to be executed. Each command can then be inspected from this perspective, to compile a table of what each should be doing if used at a given stage, and what stage the command should take the project into.

0reactions
alexgmincommented, Aug 7, 2018

I didn’t want to appear to dump a pile of complaints, I just wanted to provide some feedback, although I might have gone a bit overboard with the examples.

There are 3 possible behaviors I can think for a command that needs a Pipfile when there’s no Pipfile.

  1. Create a Pipfile and do whatever the command does.
  2. Raise an error about the missing Pipfile, like pipenv --where does currently.
  3. Don’t create a Pipfile but work normally as it there was one. For example, pipenv graph would return nothing. I don’t know if there’s a command that currently works like this.

I’m not sure how this should be focused. Maybe an issue for every command with a behavior that should be revised?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
in your Pipfile. ☤ No module named <module name>¶. This is usually a result of mixing Pipenv with system packages. We strongly recommend...
Read more >
Pipenv: promises a lot, delivers very little - Hacker News
In a Maven pom.xml I can easily exclude or override the conflicting dependency manually if needed, but I can't in a Pipfile.
Read more >
pipenv install inside virtual environment - Stack Overflow
Is there a way to install packages inside the virtual environment (venv) with pipenv? yes. there is a situation like so: you have...
Read more >
Configure a Pipenv environment | DataSpell Documentation
Pipenv also generates the Pipfile.lock file, which is used to produce deterministic builds ... and find the desired Python executable in your file...
Read more >
How to manage your python virtualenvs with Pipenv
Can 't I just install the modules on my base python installation? ... the environment is polluted or some dependency is breaking your...
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