Zsh: command not found: pipenv

Hi everyone. I am on Python walkthrough virtual environments with Pipenv.

I followed the steps in the video but got this:

zsh: command not found: pipenv

Then I found two previous posts that seem helpful.

https://discuss.codecademy.com/t/learn-python-pipenv-problem-installing-pip/532821/2

I did what the link on stackoverflow told me and got the expected version information, as shown below.
However, when I typed in pipenv --version, still got the same result:

zsh: command not found: pipenv

I don’t know whether pipenv is installed. Could someone explain what has happened?

Also, when I tried to move on to create a virtual environment for python 3, it turned out pip doesn’t have such option:

So I supposed I didn’t install pipenv or pip. What should I do?

One more thing. How can I open this text editor?

Did you try pip3 -V instead?

https://stackoverflow.com/questions/42870537/zsh-command-cannot-found-pip

2 Likes

A little detail on how you installed pipenv would be helpful.

Am I right in thinking you’re using an anaconda install for your Python distribution? The prompt including (base) suggests you’re already using a virtual environment of some sort (if not then no worries). If so then generally try to avoid mixing pip and the conda installer as they aren’t guaranteed to work together nicely (ideally use pip install or conda install, not both wherever possible).

You can check your currently installed packages with either pip list (or conda list if installed via conda package manager). Do you see pipenv included?

That text editor is VS code and you can find details about it and optional installers at the homepage- https://code.visualstudio.com/

1 Like

Thanks for the headsup. When I tried pip3 -V, it shows

Does it mean I successfully install pip? Am I already in virtual environment?

You are perfectly right. I did try to install miniconda before. But ended up installing anaconda.

I’ve followed your advice, typing in pip list, then I’ve found this:

In this case, should I uninstall conda? Since they are not supposed to work together?

And very much appreciated the text editor link!

Good news! I’ve continued to follow the steps in the walkthrough video. It seems I successfully created the virtual environment!

Thanks again!

1 Like