【发布时间】:2020-07-11 00:04:54
【问题描述】:
我正在尝试在 Mac 终端上为 Django 安装 virtualenv,但它向我显示 - zsh: command not found: virtualenv 我也尝试了以下命令
@macbook-air trydjango % virtualenv-p python3 .
zsh:找不到命令:virtualenv -p
@macbook-air trydjango % pip install virtualenv
zsh:找不到命令:pip
我也尝试按照这篇文章运行命令广告https://opensource.com/article/19/5/python-3-default-mac#what-to-do
$ brew install pyenv
但不工作
如何安装。
我不知道从哪里开始研究这个。
【问题讨论】:
-
Python2 已经过时,在大多数平台(包括当前的 macOS)上默认不安装。使用 pip3 或者如果你真的需要 python2,用 homebrew 之类的东西安装它:
brew install python@2.
标签: django macos virtualenv