-bash: /usr/local/bin/pip: /usr/

2018-09-07  本文已影响0人  左子穆

在阿里云安装django,缺发现无法正常安装pip

Welcome to Alibaba Cloud Elastic Compute Service !

# pip install django

-bash: /usr/local/bin/pip: /usr/bin/python: bad interpreter: No such file or directory

# python3 -m pip instal django

ERROR: unknown command "instal" - maybe you meant "install"

# python3 -m pip install django

Requirement already satisfied: django in /usr/local/lib/python3.6/site-packages

Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from django)

You are using pip version 9.0.3, however version 18.0 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

# python3 -m pip install --upgrade

You must give at least one requirement to install (see "pip help install")

You are using pip version 9.0.3, however version 18.0 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

# python3 -m pip install --upgrade pip

Collecting pip

  Downloading http://mirrors.aliyun.com/pypi/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)

    100% |████████████████████████████████| 1.3MB 1.8MB/s

Installing collected packages: pip

  Found existing installation: pip 9.0.3

    Uninstalling pip-9.0.3:

      Successfully uninstalled pip-9.0.3

Successfully installed pip-18.0

 python3 -m pip install django

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/

Requirement already satisfied: django in /usr/local/lib/python3.6/site-packages (2.0.3)

Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from django) (2018.3)

参照:

pip install改成

python2 -m pip install 模块名

python2.7 -m pip install 模块名

python3 -m pip install 模块名

python3.4 -m pip install** 模块名v

上一篇 下一篇

猜你喜欢

热点阅读