简体   繁体   中英

trying to set up a virtual environment, zsh: command not found: -m

I'm trying to set up a virtual environment. I have a Mac, using Mac OS Big Sur 11.1. I have installed the latest stable version of python, but when I enter this command into the terminal window

-m pip install pipenv pip --upgrade

I get the following error

zsh: command not found: -m

before, it would say

"No module named pip"

Do I have to install pip separately with

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

I thought pip was included by default when you install python? I think I might have pip because when I type

python3 -m pip

into the command line, I get a long list of commands (install packages, download packages, etc.) General options... Thus should I install pip? one person on reddit said,

Pip is not necessarily included with any version of Python. In many distributions, it must be installed separately.

If python3 -m pip works, then you have a bad install, not a missing one.

thus did I incorrectly install python? When I was installing it there was no option to

"add python to PATH"

Do I have to do this on a mac? If I input

python3 -V

in terminal, I get

Python 3.9.2

Thanks

i solved this by running,

pip3 install pip --upgrade 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM