Pipenv breaks with pre-existing usage of .venv files #2680
Labels
good first issue
Issues suitable as a newcomer to get familiar with Pipenv!
help wanted
Type: Enhancement 💡
This is a feature or enhancement request.
Issue description
tl;dr
.venv
files already exist in some dev setups but when present,pipenv
attempts to use that file as a directory and install a virtualenv into it.Virtualenvwrapper has suggested for awhile to use
.venv
files in your project directory to hold the name of your virtualenv so that you could automatically activate virtualenvs. Spacemacs (an Emacs editor setup) also does this behavior by default.Two problems:
.venv
file is present..venv
file is added to an existing pipenv project, pipenv breaks because it can't activate the virtualenv at<project_dir>/.venv
ignoring the place where it had already created a virtualenv.Prior Art Links:
.venv
files: justinabrahms/jlilly-bashy-dotfiles@04899f0#commitcomment-1526375Expected result
At the least, Pipenv should check if
.venv
is a file or a directory before attempting to automatically use it as a directory and install a virtualenv into it. If it's a file, then behave as if no.venv
was found at all.Actual result
If a
.venv
file exists in the project directory, Pipenv will attempt to create and use a virtualenv at<project_dir>/.venv
and yell at the user a bit because it's not a directory but (a) it won't actually fail and (b) it won't actually save a virtualenv anywhere.Output:
Steps to replicate
touch .venv
pipenv install
Also see output of
pipenv --venv
$ pipenv --support
REDACTED
Pipenv version:
'2018.7.1'
PEP 508 Information:
System environment variables:
ADSK_CLM_WPAD_PROXY_CHECK
ALIASES
ALLUSERSPROFILE
ANSICON
ANSICON_DEF
APPDATA
ARCHITECTURE
CHOCOLATEYINSTALL
CHOCOLATEYLASTPATHUPDATE
CMDER_ROOT
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
CONEMUANSI
CONEMUANSILOG
CONEMUARGS
CONEMUARGS2
CONEMUBACKHWND
CONEMUBASEDIR
CONEMUBASEDIRSHORT
CONEMUBUILD
CONEMUCFGDIR
CONEMUCONFIG
CONEMUDIR
CONEMUDRAWHWND
CONEMUDRIVE
CONEMUHOOKS
CONEMUHWND
CONEMUPALETTE
CONEMUPID
CONEMUSERVERPID
CONEMUTASK
CONEMUWORKDIR
CONEMUWORKDRIVE
DRIVERDATA
FPS_BROWSER_APP_PROFILE_STRING
FPS_BROWSER_USER_PROFILE_STRING
FSHARPINSTALLDIR
GIT_INSTALL_ROOT
GOPATH
GOROOT
GTK_BASEPATH
HOME
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
NUMBER_OF_PROCESSORS
ONEDRIVE
OS
PATH
PATHEXT
PLINK_PROTOCOL
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PROMPT
PSMODULEPATH
PUBLIC
RUBYOPT
SESSIONNAME
SVN_SSH
SYSTEMDRIVE
SYSTEMROOT
TEMP
TERM
TMP
USER-ALIASES
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VERBOSE-OUTPUT
WINDIR
WORKON_HOME
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenvûspecific environment variables:
Contents of
Pipfile
:The text was updated successfully, but these errors were encountered: