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` starts /bin/sh instead of bash

See original GitHub issue
  • Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv
Issue description

I just updated to 2018.7.1 and pipenv shell starts /bin/sh instead of /bin/bash (so my prompt is gone, I’m running dash, etc).

Expected result

pipenv shell should start my shell.

Actual result
remram@axon:~$ pipenv shell
Launching subshell in virtual environment…
$  . /tmp/v/.local/share/virtualenvs/v-GWEjRKuf/bin/activate
$ echo $RANDOM

Steps to replicate
remram@axon:~$ pipenv --three
remram@axon:~$ pipenv shell

I tried running this in a brand new HOME with env -i HOME=/tmp/pe bash to make sure I don’t have weird env/bashrc/… but same result.

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/home/remram/Documents/programming/_venvs/ipython/lib/python3.6/site-packages/pipenv'

Python location: '/home/remram/Documents/programming/_venvs/ipython/bin/python3.6'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/bin/python3.6m

  • 3.6: /usr/bin/python3.6

  • 2.7.15: /usr/bin/python

  • 2.7.15: /usr/bin/python2

  • 3.6.6: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-34-generic',
 'platform_system': 'Linux',
 'platform_version': '#37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018',
 'python_full_version': '3.6.3',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • HOME
  • _
  • PATH
  • LANG
  • LC_ALL
  • PWD

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/remram/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
  • LANG: C.UTF-8
  • PWD: /tmp/v

Contents of Pipfile (‘/tmp/v/Pipfile’):

url = ""
verify_ssl = true
name = "pypi"



python_version = "3.6"

Issue Analytics

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

github_iconTop GitHub Comments

techalchemycommented, Dec 3, 2018

I mean, literally dozens of users filed issues complaining that we used $SHELL and ignored what they were actively running pipenv with, so arguably I would say that it’s more strange that you are choosing to put a different shell process between yourself and pipenv.

Please read the documentation for how to specify a shell override, I’m sure it’s PIPENV_SHELL but the list is here:

And please don’t act like we are insane because your specific usage doesn’t do exactly what you expect. We are a small team and of all the things that could go ‘wrong’, or be ‘technically unfeasible’ this isn’t really one of them. It’s a behavior that had to be chosen, and when the prior behavior was the default it was both a bad user experience and supremely unpopular. Sorry you don’t think this is a technically feasible approach. You can override it with the environment variable I mentioned.

remram44commented, Oct 2, 2018

Note: your docs mention a pipenv shell -c which doesn’t seem to exist. The issue template also mentions --verbose options that are not recognized either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run pipenv shell as part of a bash script - Stack Overflow
I think you can use pipenv run for that. E.g.: pipenv run python [etc...] Which will run python within the virtual ......
Read more >
Why is it better to use "#!/usr/bin/env NAME" instead of "#!/path ...
If the program is a file beginning with `#!', the remainder of the first line specifies an interpreter for the program. The shell...
Read more >
An Effective Python Environment: Making Yourself at Home
This guide will walk you through the decisions you need to make when customizing your development environment for working with Python.
Read more >
systemd service running from pipenv - linux - Super User
ElastAlert successfully alerts when running from the command line. I want this thing to run on start and survive the odd crash so...
Read more >
Running Pipenv shell in new gnome terminal tab - Ask Ubuntu
I discovered that Pipenv has a run command to run python scrips directly in your virtual environment. So all I did was use:...
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 Hashnode Post

No results found