pipenv: pew which is in $PATH is not found

For me on ubuntu there’s a warning about pew not being in the path, while it certainly is.

$ python --version
Python 3.5.4
$ pip --version
pip 9.0.1 from /home/bogn/.pyenv/versions/3.5.4/lib/python3.5/site-packages (python 3.5)
$ pyenv --version
pyenv 1.1.5-7-gaf8cca9
$ pipenv --version
pipenv, version 8.2.7
$ pipenv install flask
Creating a virtualenv for this project…
⠋Warning: it looks like pew is not in your PATH. We cannot continue until this is resolved.
$ pew version
1.1.0

At first I thought that the issue is that I modified the $PATH in ~/.bashrc, not in ~/.profile. But after adding it to .profile as well it still doesn’t work. Note that I’ve used pyenv and it’s plugin python-build to install python. Installing and uninstalling pew[pythonz] didn’t help either. Reinstalling pipenv also wasn’t succesful.

Expected result

I would have expected that pipenv creates a new env and installs flask into it.

Actual result

$ pipenv install flask --verbose Creating a virtualenv for this project… ⠋Warning: it looks like pew is not in your PATH. We cannot continue until this is resolved.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

I have the same problem

I ran into this problem while I was following this guide and when running

pip install requests

and the error is this

Warning: PYENV_ROOT is not set. New python paths will probably not be exported properly after installation. Creating a virtualenv for this project… ⠋Warning: it looks like pew is not in your PATH. We cannot continue until this is resolved.

My $PATH returns this

`/Users/adeka/bin:/usr/local/bin:/Users/adeka/bin:/usr/local/bin:/Users/adeka/.pyenv/shims:/usr/local/Cellar/pyenv-virtualenv/1.1.1/shims:/Users/adeka/.pyenv/shims:/usr/local/Cellar/pyenv-virtualenv/1.1.1/shims:/Users/adeka/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin`

My pipenv -version rerturns this

`pipenv, version 8.2.7`

and when I run pip install pew i get this

Requirement already satisfied: pew in /Users/adeka/Library/Python/3.6/lib/python/site-packages Requirement already satisfied: setuptools>=17.1 in /usr/local/lib/python3.6/site-packages (from pew) Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.6/site-packages (from pew) Requirement already satisfied: virtualenv>=1.11 in /usr/local/lib/python3.6/site-packages (from pew)

I have tried a host of solutions but I haven’t been able to get it to work. I did not want to follow this solution as it seems unsafe.

Any help is appreciated. 😀

This is indeed a PATH issue then. You need to also add the Scripts directory (the one at the same location as python.exe) to your PATH. Commands such as pew and pip are installed there by default.

Thanks for using pipenv @anubhavdeka

Yes I added the locales and the error about the wrong locales have disappeared. Thank you!

Also as I was just reminded you will want to make sure to configure your locale correctly with these environment variables:

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