2020. 8. 21. 15:55 카테고리 없음
[MAC/PYTHON] 맥북에 파이썬 PIP 설치하기, command not found: pip

파이썬 설치하면 PIP를 쓸수있다길래 해봤는데 안되네요.

윈도우는 잘 모르겠지만 맥은 파이썬을 설치한 후에 PIP는 별도로 설치해야하나봅니다.

 

터미널에서 실행하면 다음과 같이 pip따위는 없다는 오류가 발생합니다.

kaudo@MacBookPro ~ % pip
zsh: command not found: pip

 

 

1. curl로 파이썬 파일을 하나 다운받습니다.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

kaudo@MacBookPro ~ % curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1840k  100 1840k    0     0  2115k      0 --:--:-- --:--:-- --:--:-- 2113k

 

 

2. 이전에 설치해놓은파이썬3로 다운받은 파이썬 파일을 실행합니다.
python3 get-pip.py

kaudo@MacBookPro ~ % python3 get-pip.py
Collecting pip
  Using cached pip-20.2.2-py2.py3-none-any.whl (1.5 MB)
Collecting wheel
  Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Installing collected packages: pip, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.1.1
    Uninstalling pip-20.1.1:
      Successfully uninstalled pip-20.1.1
Successfully installed pip-20.2.2 wheel-0.35.1

 

 

3. 이제 pip를 실행하면 제대로 사용하라는 안내문이 나타납니다.
pip

kaudo@MacBookPro ~ % pip

Usage:   
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to
                              WARNING, ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
                              (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or any
                              HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the
                              certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for
                              download. Implied with --no-index.
  --no-color                  Suppress colored output
  --no-python-version-warning
                              Silence deprecation warnings for upcoming unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be removed in the future.

 

 

파이썬으로 pip를 설치하고 실행한 스크린샷 입니다.

 

 

댓글을 달아 주세요

  1. 쉬운 설명 감사합니다.

    2020.11.07 19:34 [ ADDR : EDIT/ DEL : REPLY ]
  2. jtowf

    와 한참 헤메다가 덕분에 해결했습니다 감사합니다

    2020.12.17 00:34 [ ADDR : EDIT/ DEL : REPLY ]
  3. 홍무개

    저도 한방에 잘되었습니다. 감사합니다.

    2021.01.06 00:56 [ ADDR : EDIT/ DEL : REPLY ]
  4. 뱅달이

    선생님은 저의 은인이십니다. ㅠㅠ

    2021.01.13 18:41 [ ADDR : EDIT/ DEL : REPLY ]
  5. 1

    정말정말 감사합니다!

    2021.02.18 22:39 [ ADDR : EDIT/ DEL : REPLY ]
  6. d

    와 감사합니다. beautifulsoup4 설치하려고 하는 데, 안된다고 떠서 발 동동구르고 있었는 데, 빨간부분 그대로 쳐서 설치시키고 뷰티풀숩도 설치시키니 정상작동됩니다^^

    2021.03.10 15:41 [ ADDR : EDIT/ DEL : REPLY ]

최근에 올라온 글

최근에 달린 댓글