pipenv: Cannot install module - /bin/pip: No such file or directory

Hello,

Trying to install a module fails with the following error: /bin/sh: /bin/pip: No such file or directory

I am using MacOS and have installed python and python3 using homebrew. Then installed pipenv using pip3.

which pip returns: /usr/local/bin/pip and pip itself is found as a command.

However, if I use python -m pip --version it points to the default MacOS python: pip 9.0.1 from /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg (python 2.7)

I am unaware where it tries to resolve pip from and does not find it. I am not sure if there is a problem with my $PATH paths or the issue is different.

Thank you for your time!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Seems the root cause was that pew was not working due to not set locale. Setting it in .bash_profile seems to resolve the issue.

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Will further test and later update if this is solved.

$ hash -r Reset your bash cache. It will solve the problem.