Pipenv does not find pipfile in upper directory
See original GitHub issuePipenv virtualenv created for a project, at the top of my project are a pipfile and pipfile.lock files. When executing pipenv commands in sub directory (3 levels below), a new virtual env gets created.
I thought it would not be the case and pipenv would use the one at the top
Describe your environment
- OS Type: Windows 10
- Python version:
$ python -V
Python 3.6.1 :: Anaconda 4.4.0 (64-bit) - Pipenv version:
$ pipenv --version
pipenv, version 11.1.6
Expected result
I expect no new environment to be created
Actual result
Passing the option --verbose to pipenv does not work
Steps to replicate
- created a virtualenv with pipenv, and a pipfile
- create some subdirs
- in the subdir, execute pipenv --shell It creates a new env instead of using the one at the top. Please note that sometimes it works, sometimes not.
Top Pipfile [[source]]
url = “https://pypi.python.org/simple” verify_ssl = true name = “pypi”
[packages]
“pyqt5” = “" pyedflib = "” psutil = “*”
[dev-packages]
[requires]
python_version = “3.6”
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:10 (5 by maintainers)
Top Results From Across the Web
python - pipfile not found from deeper subdirectories
Consider running `pipenv install` first to automatically generate a Pipfile for you. $ cd d $ pipenv --where No Pipfile present at project...
Read more >Detect Pipfile file if it is located in the sub-folder of the project ...
Pipfile is not detected and pipenv environment is not created if it is located in the sub-folder of the project root. There is...
Read more >Frequently Encountered Pipenv Problems - Read the Docs
☤ My pyenv-installed Python is not found Make sure you have PYENV_ROOT set correctly. Pipenv only supports CPython distributions, with version name like...
Read more >pipenv Documentation
On Windows you can find the user base binary directory by running python ... Once again, you should not run pipenv as root...
Read more >Common Pipenv Errors and How to Solve Them
Locking Issue: Pipfile Contains a Reference to an Inexistent Package ... Pipfile won't lock when it tries to install packages that don't exist,...
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 FreeTop 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
Top GitHub Comments
We only check 2 or 3 levels above. This is configurable by setting the
PIPENV_MAX_DEPTH
environment variable.Perhaps my experience is another outlier, but I thought creating a subshell was default behavior for about 6 months now because using the project root environment almost never worked for me (though I do seem to recall from documentation that it was supposed to). I find the default max depth surprising and incredibly annoying, but didn’t realize I could do anything about it.
For the record, the reason my projects were so nested is because I created an environment for a series of school projects in which the file structure was dictated by the school. Our projects’ “working directories” typically start at the third level down from the project root.