Running pipenv --three in an empty directory shows Requirements.txt found
See original GitHub issueI am trying out pipenv on Mac OS X 10.11.3 - running ZSH on iTerm.
The steps that I followed are:
- mkdir test_pipenv
- cd pipenv
- pipenv --three
Pipenv’s logs showed: Requirements.txt found, instead of Pipfile! Converting…
- even though I the directory was empty.
Later, it threw a ValueError for an unknown locale.
vaibhavtulsyan:test_pipenv/ $ pipenv --three [19:32:36]
Requirements.txt found, instead of Pipfile! Converting…
Creating a virtualenv for this project…
⠋Traceback (most recent call last):
File "/usr/local/bin/pew", line 7, in <module>
from pew.pew import pew
File "/usr/local/lib/python2.7/site-packages/pew/__init__.py", line 11, in <module>
from . import pew
File "/usr/local/lib/python2.7/site-packages/pew/pew.py", line 36, in <module>
from pew._utils import (check_call, invoke, expandpath, own, env_bin_dir,
File "/usr/local/lib/python2.7/site-packages/pew/_utils.py", line 22, in <module>
encoding = locale.getlocale()[1] or 'ascii'
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 564, in getlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Frequently Encountered Pipenv Problems - Read the Docs
Run the following command: pipenv lock --clear. and try again. If this does not work, try manually deleting the whole cache directory. It...
Read more >python - How can I install packages using pip according to the ...
cd to the directory where requirements.txt is located; activate your virtualenv; run: pip install -r requirements.txt in your shell.
Read more >pipenv Documentation - Read the Docs
On Windows you can find the user base binary directory by running python -m site ... If you only have a requirements.txt file...
Read more >Pipenv: A Guide to the New Python Packaging Tool
If you run pipenv install it should automatically detect the requirements.txt and convert it to a Pipfile , outputting something like the following:....
Read more >Advanced Usage of Pipenv - Python Packaging Authority
When PyPI is omitted, then any public packages required either directly or as sub-dependencies must be mirrored onto your private index or they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems like non-intuitive behavior to automatically install the requirements.txt recursively from directories above. That may well be a totally different project, or a placeholder file (as in my case, which by the way was two directories above…). I had to reinstall three times before finding this posting and understanding that the default behavior was to search (recursively!??) in directories above. If there is no requirements file in the project directory, pipenv should not go searching… or should at least ask before converting a requirements.txt file located in a different directory.
In addition, if the correct usage is
pipenv --three install requests
to prevent pipenv from using any old requirements file it finds laying about that should be stated more clearly in the documentation.IMO, it would be better if we add more explicit behaviour to create a new project using the command
pipenv init [OPTIONS]