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

PipfileNotFound raised for no Pipfile while installing #3260

Closed
nealyip opened this issue Nov 20, 2018 · 14 comments
Closed

PipfileNotFound raised for no Pipfile while installing #3260

nealyip opened this issue Nov 20, 2018 · 14 comments
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.

Comments

@nealyip
Copy link

nealyip commented Nov 20, 2018

from the previous version, when there is no Pipfile, one will be automatically created when executing pipenv install.
However, after 2018.11.14, an error is thrown
Pipfile not found! Aborting! Please ensure that the file exists and is located in your project root directory.

Steps to replicate

1, pipenv install

@duplicate-issues
Copy link

Hey @nealyip,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄

If not, the maintainers will get to this issue shortly.

Cheers,
Your Friendly Neighborhood ProBot

@frostming
Copy link
Contributor

pipenv install without package names is disallowed when there is no Pipfile present.

Any of the following is OK to initialize a pipenv project:

$ pipenv --python python
$ pipenv --two/--three
$ touch Pipfile && pipenv install

@nealyip nealyip closed this as completed Nov 20, 2018
@ghost
Copy link

ghost commented Nov 20, 2018

@nealyip @frostming I have this same issue. Wanted to file an issue today at 8 am but could not. This time I searched again for duplicates. And almost missed this. Had to read it to realise I had the same issue.

Use Case:
Use pipenv install to create a fresh env as its faster than pipenv install x. Then use pipenv shell to enter the env and setup the env.

Steps to repro+ error:
pipenv-WYDT.txt

Expected:
pipenv installs a new env with python, pip, setuptools, and wheel. And then you can install packages without pipenv slowing you down.

Details:-
OS Specs: Edition->Windows 10 Pro,
Version->1803,
Build->17134.407
Device Specs: System type->64-bit OS, x64-based processor,
Installed RAM: 16.0GB(15.9GB usable),
Processor: Intel Core i5-7400 CPU

Python: 3.7.1
Pipenv: 2018.11.14
WinPython: 3.7.1.0-64bit

Moreover-
WinPython is not registered as system Python. Python is not on user or system Path.
No other Python version is installed on the system.

@ghost
Copy link

ghost commented Nov 20, 2018

@nealyip
Reply to:- https://github.com/pypa/pipenv/issues/3260#issuecomment-440193629

pipenv install without package names is disallowed when there is no Pipfile present.

Since when? I really don't know anything about this and I tried to. Can you please give a link?

Note( for Windows 10 1803 users): The top two methods have been tested succesfully on Windows 10 @1803!

  1. pipenv --python python

Good to know. Thanks.

  1. pipenv --two/--three

Good to know. Thanks. Also, this can be added to the error that suddenly appeared.

  1. touch Pipfile && pipenv install

I am on windows. This causes error in Powershell and cmd. touch Pipfile followed by pipenv install also doesn't work.
So, I used Notepad++ to create Pipfile. After I copy a Pipfile from the other env, edit it and paste it in the current directory, it works!

PS:- I hope this and the above comment have been helpful.

@ghost
Copy link

ghost commented Nov 20, 2018

@frostming Is there any chance this will get fixed? If yes, thanks a lot. I would like to help.

If no, thanks to all contributors for pipenv, it was like salt( is to food). I'll just have to stop using pipenv and go back to using virtualenv. I can't change my workflow. I would still like to help, but I am not sure if its okay to contribute to projects I don't use often. Am I mistaken?

@frostming
Copy link
Contributor

I just reviewed the original issue linked above and find it was a bad fix to change the behavior. You are right, pipenv install should work to create the Pipfile correctly.

I will submit a fix soon. Thank you.

@frostming frostming reopened this Nov 20, 2018
@techalchemy
Copy link
Member

@snow8gaia I'm also interested in this comment specifically:

WinPython is not registered as system Python. Python is not on user or system Path.

can you run pipenv --support and provide the output?

@techalchemy
Copy link
Member

Also in retrospect, there was no api change introduced and no flaw in the exception handling, there is just a bug in pipfile generation which results in the downstream exception which tells you there is no pipfile.

Fix will be up in a sec

techalchemy added a commit that referenced this issue Nov 20, 2018
- Fixes #3260

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy added Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. labels Nov 20, 2018
@techalchemy techalchemy added this to the November Bugfix Release milestone Nov 20, 2018
@ghost
Copy link

ghost commented Nov 21, 2018

WinPython is not registered as system Python. Python is not on user or system Path.

Correction: WinPython temporarily adds the required files to Path. I don't see(by using path in cmd) WinPython's additions to the beginning of the Path in another cmd prompt that is open at the same time.

When I compare the output of path in the two cmd prompts:- WinPython prompt's path prepends some extra stuff. While a regular prompt does not have the prepends.

@ghost
Copy link

ghost commented Nov 21, 2018

I forgot, thanks a lot for the quick response.

@ghost
Copy link

ghost commented Nov 28, 2018

This issue is resolved in:-
pipenv version: 2018.11.26
released on- Nov 26, 2018

@ghost
Copy link

ghost commented Nov 28, 2018

Thanks a lot to the pipenv team, especially @techalchemy and @frostming.

@techalchemy
Copy link
Member

Thanks for the message, it helps to know it is appreciated!

@vhosakot
Copy link

Saw the same error with python 3.7:

[pipenv.exceptions.PipfileNotFound]: raise exceptions.PipfileNotFound

and pipenv --python python3.7 resolved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

No branches or pull requests

4 participants