Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pipenv error "bad interpreter: No such file or directory"

I am trying to install requirements from a pipfile however when I type pipenv and press enter, i receive this error message -bash: /Users/jkelly/.local/bin/pipenv: /usr/local/Cellar/python/3.7.0/bin/python3.7: bad interpreter: No such file or directory This python directory doesn't exist. I am unable to execute pipenv.

python --version returns Python 3.6.6. I manage all my versions of python with pyenv.

This is a complete list of all of my pyenv shims

/Users/jkelly/.pyenv/shims/2to3
/Users/jkelly/.pyenv/shims/2to3-3.6
/Users/jkelly/.pyenv/shims/easy_install
/Users/jkelly/.pyenv/shims/easy_install-3.6
/Users/jkelly/.pyenv/shims/idle
/Users/jkelly/.pyenv/shims/idle3
/Users/jkelly/.pyenv/shims/idle3.6
/Users/jkelly/.pyenv/shims/pip
/Users/jkelly/.pyenv/shims/pip3
/Users/jkelly/.pyenv/shims/pip3.6
/Users/jkelly/.pyenv/shims/pydoc
/Users/jkelly/.pyenv/shims/pydoc3
/Users/jkelly/.pyenv/shims/pydoc3.6
/Users/jkelly/.pyenv/shims/python
/Users/jkelly/.pyenv/shims/python-config
/Users/jkelly/.pyenv/shims/python3
/Users/jkelly/.pyenv/shims/python3-config
/Users/jkelly/.pyenv/shims/python3.6
/Users/jkelly/.pyenv/shims/python3.6-config
/Users/jkelly/.pyenv/shims/python3.6m
/Users/jkelly/.pyenv/shims/python3.6m-config
/Users/jkelly/.pyenv/shims/pyvenv
/Users/jkelly/.pyenv/shims/pyvenv-3.6

pipenv is installed via pipsi. This error seems to have nothing to do with the Pipfile. I must have an improperly configured path somewhere.

export PATH=/Users/jkelly/.local/bin:$PATH
export PYENV_SHELL=bash
eval "$(pyenv init -)"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/node@6/bin:$PATH"
export PATH="/usr/local/opt/gettext/bin:$PATH"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
like image 387
Jack Avatar asked Oct 27 '25 17:10

Jack


1 Answers

On Mac OSX, I solved this by doing

brew install --force pipenv

then

brew link --overwrite pipenv

to do a reinstall.

like image 144
Stryker Avatar answered Oct 29 '25 05:10

Stryker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!