pip: command not found 一系列报错

#安装python2.7版本

tar xvf Python-2.7.9.tar.xz

cd Python-2.7.9

./configure --prefix=/usr/bin/python2.7

make

make install

mv /usr/bin/python /usr/bin/python.bak

ln -s /usr/bin/python2.7/bin/python2.7 /usr/bin/python

问题1:yum安装报错

No module named yum

解决:

前面安装了python2.7,默认2.6。python 版本更改后,

/usr/bin/yum 文件需要更新  首行改为 #!/usr/bin/python2.6

问题2:pip command not found

[[email protected] Python-2.7.9]# pip install jinja2

-bash: pip: command not found

解决[[email protected] ~]#  yum -y install python-setuptools

[[email protected] ~]#  easy_install pip

问题3:ImportError: No module named pkg_resources

[[email protected] ~]# easy_install pip

Traceback (most recent call last):

File "/usr/bin/easy_install", line 5, in <module>

from pkg_resources import load_entry_point

ImportError: No module named pkg_resources

解决:

[[email protected] ~]# curl https://bootstrap.pypa.io/ez_setup.py | python

问题4:easy_install pip 报错 The ‘distribute==0.6.10‘ distribution was not found

[[email protected] ~]# easy_install pip

Traceback (most recent call last):

File "/usr/bin/easy_install", line 5, in <module>

from pkg_resources import load_entry_point

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3019, in <module>

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3003, in _call_aside

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3032, in _initialize_master_working_set

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 655, in _build_master

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 963, in require

File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 849, in resolve

pkg_resources.DistributionNotFound: The ‘distribute==0.6.10‘ distribution was not found and is required by the application

解决:安装distribute

wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz --no-check-certificate

tar zxvf distribute-0.6.10.tar.gz

cd distribute-0.6.10

python setup.py install

[[email protected] ~]# easy_install pip 成功

问题5:上图显示安装pip成功,但执行命令依然显示 command not found

[[email protected] ~]# pip install jinja2

-bash: pip: command not found

排查:

[[email protected] ~]# which pip

[[email protected]~]# ls /usr/bin/pip

ls: 无法访问/usr/bin/pip: 没有那个文件或目录

解决:创建软连接:

[[email protected] ~]# ln -s /usr/bin/python2.7/bin/pip /usr/bin/pip

安装成功

[[email protected]~]# pip install jinja2

Collecting jinja2

Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)

100% |████████████████████████████████| 348kB 28kB/s

Collecting MarkupSafe>=0.23 (from jinja2)

Downloading MarkupSafe-1.0.tar.gz

Installing collected packages: MarkupSafe, jinja2

Running setup.py install for MarkupSafe ... done

Successfully installed MarkupSafe-1.0 jinja2-2.9.6

时间: 2024-12-21 13:18:03

pip: command not found 一系列报错的相关文章

Windows下使用pip安装python包是报错-UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0xcb in position 0

先交待下开发环境: 操作系统:Windows 7 Python版本:2.7.9 Pip版本:6.1.1 其他环境忽略 在windows下使用pip下载python包,出现如下错误 [plain] view plain copy Collecting xxxxxx Exception: Traceback (most recent call last): File "D:\Python27\lib\site-packages\pip-6.0.8-py2.7.egg\pip\basecommand.

Can&#39;t use Subversion command line client:svn 报错处理

需要主意的有两点: 1.安装svn的时候,第二项,command line client tools也要安装 2.点击报错的fix it 打开了settings,把红色框中的地址改为安装svn地址路径下的svn.exe Android Studio面板中的以下两个按钮分别是 svn的跟新 和 上传 Can't use Subversion command line client:svn 报错处理

记一次修改sga大小之后出现的一系列报错

记录一次修改sga大小之后出现的一系列报错 修改了oracle的sga大小之后,遇到了一系列的报错. 00844和00851报错 SQL> startup; ORA-00844: Parameter not taking MEMORY_TARGET into account ORA-00851: SGA_MAX_SIZE 2147483648 cannot be set to more than MEM SQL> 01078报错 SQL> startup; ORA-01078: fail

pip安装numpy等库报错:is not a supported wheel on this platform

可能的原因1:安装的不是对应python版本的库,下载的库名中cp27代表python2.7,其它同理. 可能的原因2:这个是我遇到的情况(下载的是对应版本的库,然后仍然提示不支持当前平台) 我下载到的numpy库文件名: numpy-1.10.4+mkl-cp27-cp27m-win32.whl 使用pip安装(在命令行中): pip installnumpy-1.10.4+mkl-cp27-cp27m-win32.whl 报错:***  is not a supported wheel on

关于taro更新问题一系列报错的问题解决

更新 Taro 提供了更新命令来更新 CLI 工具自身和项目中 Taro 相关的依赖 更新 Taro CLI 工具 # taro   $ taro update self   # npm   npm i -g @tarojs/[email protected]   # yarn   yarn global add @tarojs/[email protected] 更新项目中 Taro 相关的依 $ taro update project 还会报一下错误 taro  Cannot read pr

pip安装python第三方包报错

报错信息: HTTPConnectionPool(host=''xx.xx.xx.xx', port=xx): Max retries exceeded with url: (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000237EE44EF98>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间

pip安装psutil模块时候报错:yum install python-devel mysql-devel zlib-devel openssl-devel

yum install python-devel mysql-devel zlib-devel openssl-devel [[email protected] software]# pip install psutil Collecting psutil Using cached psutil-2.2.1.tar.gz Installing collected packages: psutil Running setup.py install for psutil Successfully i

pip install –r ./requirements.txt 报错 改成 pip install -r requirements.txt 成功

Invalid requirement: '–r'Traceback (most recent call last): File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__ req = REQUIREMENT.parseString(requirement_stri

Mac使用pip命令安装selenium包报错解决方法

1.使用命令:  pip install selenium 2.换成命令: python -m pip install selenium 即可成功安装 原文地址:https://www.cnblogs.com/jasmine0112/p/11756182.html