pipenv
pipenv copied to clipboard
pipenv shell command changes to other directory
Why this -> "shell is intended to work this way."
Issue description
#1459 #1464
Expected result
After type "pipenv shell" It should stay at directory where you typed.
Actual result
Jump to other directory
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: '/usr/local/Cellar/pipenv/2020.6.2/libexec/lib/python3.8/site-packages/pipenv'
Python location: '/usr/local/Cellar/pipenv/2020.6.2/libexec/bin/python3.8'
Python installations found:
- 3.8.5:
/usr/local/opt/[email protected]/bin/python3 - 3.8.5:
/usr/local/opt/[email protected]/bin/python3.8 - 3.8.5:
/usr/local/bin/python3 - 3.8.5:
/usr/local/bin/python3.8 - 3.8.3:
/Users/<username>/.pyenv/versions/3.8.3/bin/python3 - 3.7.3:
/usr/bin/python3 - 2.7.16:
/usr/bin/python2 - 2.7.16:
/usr/bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.8.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '19.6.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT '
'2020; root:xnu-6153.141.1~9/RELEASE_X86_64',
'python_full_version': '3.8.5',
'python_version': '3.8',
'sys_platform': 'darwin'}
System environment variables:
- PATH
- STARSHIP_SHELL
- TERM_PROGRAM`
- PYENV_ROOT`
- PIPENV_VERBOSITY`
- SHELL
- TERM
- TMPDIR`
- TERM_PROGRAM_VERSION`
- TERM_SESSION_ID`
- ZSH
- USER
- SSH_AUTH_SOCK
- PAGER
- LSCOLORS
- _
- PWD
- LANG`
- XPC_FLAGS`
- XPC_SERVICE_NAME`
- PYENV_SHELL`
- SHLVL`
- HOME`
- LESS`
- LOGNAME`
- GOPATH`
__CF_USER_TEXT_ENCODINGPIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_VERBOSITY:-1
Debug–specific environment variables:
- PATH: /usr/local/Cellar/pipenv/2020.6.2/libexec/tools:/Users/
/.pyenv/shims:/usr/local/Cellar/ruby/2.7.1_2/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/[email protected]/bin:/bin:/usr/local/bin:/Users/ /.pyenv/bin:/Users/ /.cargo/bin:/Users/ /.cargo/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin - SHELL: /bin/zsh
- LANG: en_AU.UTF-8`
- PWD: /Users/username/Codes/pycodes/djangoproject
Contents of Pipfile ('/Users/username/Codes/pycodes/djangoproject/Pipfile'):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
[requires]
python_version = "3.8"
Also interested in why this would be the desired behaviour
Agree that this is very annoying.
Also experiencing this.
This looks related to #1459. I saw this comment that says this may be intentional? Not sure if this is intentional or a bug.
https://github.com/pypa/pipenv/issues/1459#issuecomment-368096870
I guess it was intentional -- I haven't thought a lot about it or the implications, but the original author of this issue is a ghost now. I would suggest that anyone who wants the behavior of pipenv shell to be different, to give it some thought and open a new well formed issue report, and even better would be consider what the changes would be, and if possible open a PR.
a cheesy workaround:
pipenv shell "cd <your dir>"