-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pipenv breaks with pre-existing usage of .venv files #2680
Comments
I guess one simple way out is to change the @tgroshon Can you verify that in this configuration, a |
@uranusjr Yes I agree with you!
In the future, it may make sense to also allow a |
I agree with the allow path part :D It should also be relatively simple to do—just detect if the content contains a Call out for contributors: This would be a very good feature to work on, since it would also solve a common request about knowing the environment location ahead-of-time, or create the environment in a user-defined location, e.g. #589 #746. |
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: