我想按照这个说明安装 Tensorflow。 https://www.tensorflow.org/versions/r0.12/get_started/os_setup#pip_installation。
但是当我在终端上尝试这段代码时,它会返回一个错误。
$ sudo pip3 install --upgrade $TF_BINARY_URL
sudo: pip3: command not found
所以我安装了 Homebrew 并尝试卸载并重新安装 pip-3,但没有奏效。
MakotonoMacBook-ea:~ makotomiyazaki$ brew uninstall python3-pip
Error: No such keg: /usr/local/Cellar/python3-pip
MakotonoMacBook-ea:~ makotomiyazaki$ brew install python3-pip
Error: No available formula with the name "python3-pip"
==> Searching for a previously deleted formula...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
我应该怎么做才能获得 pip3?我的操作系统是 macOS High Sierra,我已经安装了 python 3.6.2。
编辑:我试过
python3 -m pip
返回的是这个。
The directory '/Users/makotomiyazaki/Library/Caches/pip/http' or its
parent directory is not owned by the current user and the cache has
been disabled. Please check the permissions and owner of that
directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/makotomiyazaki/Library/Caches/pip' or its parent
directory is not owned by the current user and caching wheels has been
disabled. check the permissions and owner of that directory. If
executing pip with sudo, you may want sudo's -H flag.
You must give at least one requirement to install (see "pip help
install")
我也尝试了 which pip3,但我不知道它是否有效......
MakotonoMacBook-ea:~ makotomiyazaki$ sudo which pip3 install --upgrade $TF_BINARY_URL
/usr/bin/install