2017-12-28 9 views
0

이 지침에 따라 Tensorflow를 설치하려고합니다. https://www.tensorflow.org/versions/r0.12/get_started/os_setup#pip_installation.pip3 : 명령을 찾을 수 없습니다.

그러나 터미널에서이 코드를 시도하면 오류가 반환됩니다.

$ 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을 얻으려면 어떻게해야합니까? 내 OS가 macOS High Sierra이고 파이썬 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") 

나는 또한 pip3했지만,이 일을하면 그냥 모르는 ... 전체 경로/디렉토리의 예를 작성

MakotonoMacBook-ea:~ makotomiyazaki$ sudo which pip3 install --upgrade $TF_BINARY_URL 
/usr/bin/install 
+1

'python3 -m pip'는 작동합니까? 당신은 어쨌든 venv에 패키지를 설치해야합니다. – Ryan

+0

[bash : pip : command not found] (https://stackoverflow.com/questions/9780717/bash-pip-command-not-found)의 가능한 중복 – dstudeba

+0

'which pip3'을 사용해 보셨습니까? 나는 둘 다 python2와 python3을 설치했기 때문에 나는 전체 경로를해야 할 별명을 설정하기에는 너무 게으른 편이다. – dstudeba

답변

0

pip3을 설치해야합니다.

리눅스에

명령은 다음과 같습니다 첫째 양조를 사용하여 Mac의 sudo apt install python3-pip

을,
brew install python3 그런 brew postinstall python3

가 작동하는지 확인 pip3 -V를 호출하십시오.

0

. (창문 용) C:\Programs\Python\Python36-32\Scripts\pip3.exe install mypackage. 내가 삐딱 거리는 데 어려움을 겪었을 때 이것은 잘 돌아갔다.

+0

귀하의 의견을 보내 주셔서 감사합니다! 그러나 어떤 디렉토리를 써야하는지 잘 모르겠습니다. 나는 내 Mac에 상대적으로 새로운 ... –