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 install error: bad interpreter: No such file or directory

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.

Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.

Make sure to mention your debugging experience if the documented solution failed.

Issue description

Pipenv suddenly nor working today. When I try to search Stackoverflow, it seems not only me having the problem. I saw two questions:

Expected result

No error

Actual result

Installing pandas…
⠋ Installing...Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

⠙ Installing pandas...Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

Error:  An error occurred while installing pandas!
Error text: 
/bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/pip: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: bad interpreter: No such file or directory

✘ Installation Failed 

Steps to replicate

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

Please run $ pipenv --support, and paste the results here. Don’t put backticks (`) around it! The output already contains Markdown formatting.

If you’re on macOS, run the following:

$ pipenv --support | pbcopy

If you’re on Windows, run the following:

> pipenv --support | clip

If you’re on Linux, run the following:

$ pipenv --support | xclip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

uranusjrcommented, Sep 22, 2020

Do you use Homebrew? This is a common problem with Python installed from Homebrew. The only way to fix this is to pipenv --rm and rebuild the virtual environment.

kychanbpcommented, Sep 23, 2020

I found the solution. I need to remove the /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93 file.

In fact all file starting with src-*

Read more comments on GitHub >

github_iconTop Results From Across the Web

zsh: /usr/local/bin/pipenv: bad interpreter: /usr/local/opt/python ...
I had this same error with awscli . The solution was to install python@3.7 via homebrew and then cp that installation into the...
Read more >
python3.7: bad interpreter: No such file or directory - Super User
I've tried uninstalling virtualenv with both pip and pip3 and I get: Skipping virtualenv as it is not installed. How can I fix...
Read more >
virtualenv bad interpreter
If this says "No such file or directory", then pip is trying to use a python binary that has been removed. Next, try...
Read more >
Frequently Encountered Pipenv Problems
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing ......
Read more >
[Example code]-Getting error "/usr/bin/python3.9: bad interpreter
Coding example for the question Getting error "/usr/bin/python3.9: bad interpreter: No such file or directory" after installing pip in ubuntu 16.04.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found