I am encountering an issue in trying to install PIP3 for my Mac terminal

34 Views Asked by At

I successfully installed:

python3 -m pip install gluoncv

Then I successfully installed:

pip3 install virtualenv

But I encountered an issue zsh: command not found: virtualenv when I tried to install the following:

virtualenv --python=/usr/bin/python2.7 python27

What remedy would you suggest? My goal is to instal PIP and use MLModels with Xcode. I'm a beginner programmer, so hand holding & talking to me like I'm 5 year old is appreciated! Thanks!

2

There are 2 best solutions below

0
Evyn On

Try python3 -m virtualenv --python=/usr/bin/python2.7 python27

As a rule of thumb, if you installed it through python3 -m pip, you run it using python3 -m ...

0
gattsbr On

And here's a zsh-specific version: https://stackoverflow.com/a/11025993

The PATH variable holds a list of directories separated by colons, so if you want to add more than one directory, just put a colon between them:

export PATH=$PATH:/usr/local/git/bin:/usr/local/bin