Pipenv chooses wrong project path
See original GitHub issueWhen creating a new environment with pipenv --python 3, it does not use the current directory as the project home, but instead chooses a directory two directories up from the current working directory, as illustrated here:
~/P/mpx-python-api pwd
/Users/loke/Projects/mpx-python-api
~/P/mpx-python-api pipenv --python 3
Creating a virtualenv for this project…
Using /usr/local/bin/python3 to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/loke/.virtualenvs/loke-WdDiAoi-/bin/python3.6
Also creating executable in /Users/loke/.virtualenvs/loke-WdDiAoi-/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/loke/.virtualenvs/loke-WdDiAoi-
~/P/mpx-python-api pipenv --where (4s 524ms)
/Users/loke
~/P/mpx-python-api
Describe your environment
- OS Type macOS High Sierra
- Python version:
$ python -V
Python 2.7.14 (default) Python 3.6.3 (python3) - Pipenv version:
$ pipenv --version
pipenv, version 8.3.2 (installed via brew)
Expected result
I expected a virtualenv be created for the path /Users/loke/Projects/mpx-python-api
Actual result
A virtualenv was created for /Users/loke
Steps to replicate
Simply create the virtualenv with pipenv
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Frequently Encountered Pipenv Problems - Read the Docs
Uninstall all existing Pipenv installations, and see ☤ Installing Pipenv to choose one of the recommended way to install Pipenv instead. ☤ My...
Read more >Why is pipenv telling me the wrong version of python?
1 Answer 1 · The virtualenv is stored globally with the name of the project's root directory plus the hash of the full...
Read more >Common Pipenv Errors - Towards Data Science
Pipenv manages dependencies on a per-project basis, so it is best to use Pipenv within your project directory.
Read more >Configure a Pipenv environment | PyCharm Documentation
Open any directory with your source files that contains the Pipenv file: select File | Open from the main menu and choose the...
Read more >Advanced Usage of Pipenv — pipenv 11.7.2 documentation
To use Pipenv with a Conda–provided Python, you simply provide the path to the ... 5/5 — 00:00:03 To activate this project's virtualenv,...
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
remove the Pipfile from your home directory like mv ~/Pipfile* /tmp
Hi @colde, do you have a pipfile anywhere above that folder in your directory structure. Pipenv will search up through the directory tree for a pipfile and use that as the project root. If you remove it, you should be able to create a venv for that directory. If this isn’t the case let me know!