I'm new to Python development and attempting to use pipenv. I ran the command pip install pipenv
, which ran successfully:
...
Successfully built pipenv pathlib shutilwhich pythonz-bd virtualenv-clone
Installing collected packages: virtualenv, pathlib, shutilwhich, backports.shutil-get-terminal-size, pythonz-bd, virtualenv-clone, pew, first, six, click, pip-tools, certifi, chardet, idna, urllib3, requests, pipenv
...
However, when I run the command pipenv install
in a fresh root project directory I receive the following message: -bash: pipenv: command not found
. I suspect that I might need to modify my .bashrc, but I'm unclear about what to add to the file or if modification is even necessary.
You might consider installing
pipenv
viapipsi
.Unfortunately there are some issues with macOS + python3 at the time of writing, see 1, 2. In my case I had to change the bashprompt to
#!/Users/einselbst/.local/venvs/pipsi/bin/python
After installing pipenv (
sudo pip install pipenv
), I kept getting the "Command Not Found" error when attempting to run thepipenv shell
command.I finally fixed it with the following code:
I have same problem with
pipenv
on Mac OS X 10.13 High Seirra, another Mac works just fine. I use Heroku to deploy my Django servers, some in 2.7 and some in 3.6. So, I need both 2.7 and 3.6. When HomeBrew install Python, it keepspython
points to original 2.7, andpython3
points to 3.6.The problem might due to
$ pip install pipenv
. I checked /usr/local/bin and pipenv isn't there. So, I tried a full uninstall:Then reinstall and works now:
On Mac OS X Catalina it appears to follow the Linux path. Using any of:
Essentially installs pipenv here:
But its not the executable and so is never found. The only thing that worked for me was
This seems to result in an
__init__.py
file in the above directory that has contents to correctly expose thepipenv
command.and everything started working, when all other posted and commented suggestions on this question failed.
The pipenv package certainly seems quite picky.
I tried this:
python -m pipenv # for python2
python3 -m pipenv # for python3
Hope this can help you.
That happens because you are not installing it globally (system wide). For it to be available in your
path
you need to install it usingsudo
, like this: