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 fails using zsh: The command was not found or was not executable

See original GitHub issue

Hello, I’m trying to use pipenv shell but I always get the error The command was not found or was not executable: /tmp/test_pipenv/zsh. I’m using zsh.

Describe your environment
  1. OS Type: Archlinux with kernel 4.13.1
  2. Python version: Python 3.6.3
  3. Pipenv version: 8.3.2
Expected result

Start a new shell with the pipenv environment.

Actual result
 /tmp/test_pipenv  % pipenv install --verbose
Creating a virtualenv for this project…
⠋Using base prefix '/usr'
New python executable in /home/lesell_b/.local/share/virtualenvs/test_pipenv-th_PmQW6/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/lesell_b/.local/share/virtualenvs/test_pipenv-th_PmQW6
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (c23e27)!                                                                                                                Installing dependencies from Pipfile.lock (c23e27)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell

 /tmp/test_pipenv  % ls
Pipfile  Pipfile.lock

 /tmp/test_pipenv  % pipenv shell --verbose
Spawning environment shell (/tmp/test_pipenv/zsh). Use 'exit' to leave.
Traceback (most recent call last):
  File "/home/lesell_b/.local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.3.2', 'console_scripts', 'pipenv')()
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/cli.py", line 2197, in shell
    do_shell(three=three, python=python, fancy=fancy, shell_args=shell_args)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/cli.py", line 2125, in do_shell
    terminal_dimensions.columns
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 198, in __init__
    self._spawn(command, args, preexec_fn, dimensions)
  File "/home/lesell_b/.local/lib/python3.6/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 271, in _spawn
    'executable: %s.' % self.command)
pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: /tmp/test_pipenv/zsh.
Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

$ # Using zsh
$ mkdir test_pipenv
$ cd test_pipenv
$ pipenv install
$ pipenv shell

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

18reactions
jsrice7391commented, Mar 20, 2019

I did the classic install and then re-install with homebrew and it worked marvelously.

brew uninstall pipenv
brew install pipenv
10reactions
subokitacommented, Jan 12, 2018

@sallybananas Just add export SHELL=/bin/zsh into your .zshrc, open a new shell, and try pipenv shell again

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Pipenv: Command Not Found - Stack Overflow
1. Check /usr/local/bin/pipenv — is it there? · 4. Same problem here: succesfully built pipenv but no sign of pipenv folder in /usr/local/bin...
Read more >
Solving `command not found: pipenv` - Koen Woortman
Configure your shell PATH environment variable to to solve the error where pipenv is not found.
Read more >
Pipenv --version leads to "zsh: command not found
PATH is an environment variable that tells your system where to look for executable files when you run a command in that shell....
Read more >
Configure a Pipenv environment | PyCharm Documentation
If the pipenv executable is not found, follow the pipenv installation procedure to discover the executable path, and then paste it in the...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . ... We're actively working to solve this...
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