question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv shell command changes to other directory

See original GitHub issue

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/python@3.8/bin/python3
  • 3.8.5: /usr/local/opt/python@3.8/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_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_VERBOSITY: -1

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2020.6.2/libexec/tools:/Users/<uname>/.pyenv/shims:/usr/local/Cellar/ruby/2.7.1_2/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/python@3.8/bin:/bin:/usr/local/bin:/Users/<uname>/.pyenv/bin:/Users/<username>/.cargo/bin:/Users/<uername>/.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"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
aopcommented, Sep 3, 2020

Also interested in why this would be the desired behaviour

2reactions
btonassecommented, Jul 9, 2021

Agree that this is very annoying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv: only works in a installed folder? - Stack Overflow
pipenv : only works in a installed folder? · Just use pipenv shell in the project directory with the pipfile, then you can...
Read more >
Advanced Usage of Pipenv - Read the Docs
You can force Pipenv to use a different cache location by setting the environment variable PIPENV_CACHE_DIR to the location you wish. This is...
Read more >
Making pipenv easier to work with | by Baptiste Vauthey | bops
pipenv is great. It's the easiest way to isolate python environments, and if you don't use virtual environments for python development, ...
Read more >
Pipenv & Virtual Environments - Python Packaging Authority
It's because this command is intended to be run in a shell (also called a terminal ... To install packages, change into your...
Read more >
pipenv Documentation - manpages.ubuntu!
To install packages, change into your project's directory (or just an empty ... all commands have access to your installed packages with $...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found