pipenv install error: bad interpreter: No such file or directory
See original GitHub issueBe 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: https://stackoverflow.com/questions/64008062/pipenv-error-bad-interpreter-no-such-file-or-directory https://stackoverflow.com/questions/64005389/pipenv-install-error-bad-interpreter-no-such-file-or-directory
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
Output:
⠙ Installing pandas...Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory
Output:
Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory
Output:
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:
- Created 3 years ago
- Comments:9 (2 by maintainers)
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.I found the solution. I need to remove the /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93 file.
In fact all file starting with src-*