본문 바로가기
개발/버그 픽스

[Ubuntu] #001 Command 'pip' not found

by DoBeFree 2022. 3. 19.
반응형

OS 및 파이썬 버전

* Ubuntu 20.04 LTS
* Anaconda Python 3.9.7

상황

파이썬 가상환경 생성 후 라이브러리 설치를 위한 pip 메시지 입력시에 pip를 찾을 수 없는 현상. 파이썬은 이미 설치되어 있고 가상환경이 아닌 기본환경의 경우 pip 명령어를 정상적으로 사용할 수 있는 상황

에러메시지 : Command 'pip' not found, but can be installed with:

(plotly) da-machine:~$ pip
Command 'pip' not found, but can be installed with:

apt install python3-pip
Please ask your administrator.

해결

conda 명령어를 통해서 pip 설치

(plotly) da-machine:~$ conda install pip

Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.10.3
  latest version: 4.12.0

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: ~/opt/anaconda/envs/plotly

  added / updated specs:
    - pip


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2022.2.1   |       h06a4308_0         122 KB
    certifi-2021.10.8          |   py39h06a4308_2         151 KB
    ncurses-6.3                |       h7f8727e_2         782 KB
    openssl-1.1.1m             |       h7f8727e_0         2.5 MB
    readline-8.1.2             |       h7f8727e_1         354 KB
    sqlite-3.38.0              |       hc218d9a_0         1.0 MB
    wheel-0.37.1               |     pyhd3eb1b0_0          33 KB
    zlib-1.2.11                |       h7f8727e_4         108 KB
    ------------------------------------------------------------
                                           Total:         5.0 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
  ca-certificates    pkgs/main/linux-64::ca-certificates-2022.2.1-h06a4308_0
  certifi            pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
  libgomp            pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
  ncurses            pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
  openssl            pkgs/main/linux-64::openssl-1.1.1m-h7f8727e_0
  pip                pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
  python             pkgs/main/linux-64::python-3.9.7-h12debd9_1
  readline           pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
  setuptools         pkgs/main/linux-64::setuptools-58.0.4-py39h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.38.0-hc218d9a_0
  tk                 pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
  tzdata             pkgs/main/noarch::tzdata-2021e-hda174b7_0
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7f8727e_4


Proceed ([y]/n)? y


Downloading and Extracting Packages
ncurses-6.3          | 782 KB    | ##################################################################### | 100% 
wheel-0.37.1         | 33 KB     | ##################################################################### | 100% 
ca-certificates-2022 | 122 KB    | ##################################################################### | 100% 
openssl-1.1.1m       | 2.5 MB    | ##################################################################### | 100% 
zlib-1.2.11          | 108 KB    | ##################################################################### | 100% 
sqlite-3.38.0        | 1.0 MB    | ##################################################################### | 100% 
readline-8.1.2       | 354 KB    | ##################################################################### | 100% 
certifi-2021.10.8    | 151 KB    | ##################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
반응형

'개발 > 버그 픽스' 카테고리의 다른 글

[OSX] ModuleNotFoundError: No module named 'selenium'  (0) 2022.05.15
[OSX] #001 pip: command not found  (0) 2022.03.19

댓글