Linux 下安装easy_install 安装pip 安装django

Centos6.5 下在线安装easy_install

 wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
 python ez_setup.py --insecure


执行过程如下:

[root@localhost data]# wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
--2014-12-27 11:33:41--  https://bootstrap.pypa.io/ez_setup.py
Resolving bootstrap.pypa.io... 103.245.222.175
Connecting to bootstrap.pypa.io|103.245.222.175|:443... connected.
WARNING: cannot verify bootstrap.pypa.io’s certificate, issued by “/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA”:
  Issued certificate not yet valid.
HTTP request sent, awaiting response... 200 OK
Length: 11432 (11K) [text/x-python]
Saving to: “ez_setup.py”

100%[====================================================================================================>] 11,432      --.-K/s   in 0s      

2014-12-27 11:33:41 (510 MB/s) - “ez_setup.py” saved [11432/11432]

[root@localhost data]# python ez_setup.py --insecure
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-15.2.zip
Extracting in /tmp/tmpHg_lBZ
Now working in /tmp/tmpHg_lBZ/setuptools-15.2
Installing Setuptools
running install
running bdist_egg
running egg_info
writing requirements to setuptools.egg-info/requires.txt
writing setuptools.egg-info/PKG-INFO
writing top-level names to setuptools.egg-info/top_level.txt
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
reading manifest file 'setuptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'setuptools.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build                                                                                                                                            。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。                   <span style="white-space:pre">																	</span>  byte-compiling build/bdist.linux-x86_64/egg/setuptools/utils.py to utils.pyc
byte-compiling build/bdist.linux-x86_64/egg/setuptools/lib2to3_ex.py to lib2to3_ex.pyc
byte-compiling build/bdist.linux-x86_64/egg/setuptools/py26compat.py to py26compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/setuptools/dist.py to dist.pyc
byte-compiling build/bdist.linux-x86_64/egg/setuptools/py27compat.py to py27compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/setuptools/depends.py to depends.pyc
byte-compiling build/bdist.linux-x86_64/egg/_markerlib/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/_markerlib/markers.py to markers.pyc
byte-compiling build/bdist.linux-x86_64/egg/easy_install.py to easy_install.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying setuptools.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/setuptools-15.2-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing setuptools-15.2-py2.6.egg
Copying setuptools-15.2-py2.6.egg to /usr/lib/python2.6/site-packages
Adding setuptools 15.2 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.6 script to /usr/bin


Installed /usr/lib/python2.6/site-packages/setuptools-15.2-py2.6.egg
Processing dependencies for setuptools==15.2
Finished processing dependencies for setuptools==15.2<span style="white-space:pre">									</span>

easy_install  pip 

[root@localhost data]# 
[root@localhost data]# 
[root@localhost data]# easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 6.1.1
Downloading https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#md5=6b19e0a934d982a5a4b798e957cb6d45
Processing pip-6.1.1.tar.gz
Writing /tmp/easy_install-MNHTTJ/pip-6.1.1/setup.cfg
Running pip-6.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MNHTTJ/pip-6.1.1/egg-dist-tmp-cD4H8G
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
creating /usr/lib/python2.6/site-packages/pip-6.1.1-py2.6.egg
Extracting pip-6.1.1-py2.6.egg to /usr/lib/python2.6/site-packages
Adding pip 6.1.1 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.6 script to /usr/bin
Installing pip2 script to /usr/bin

Installed /usr/lib/python2.6/site-packages/pip-6.1.1-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip


安装django 


pip install django   安装最新稳定版的

pip install django==1.4.5

[root@localhost data]# pip install django==1.4.5
Collecting django==1.4.5
/usr/lib/python2.6/site-packages/pip-6.1.1-py2.6.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading Django-1.4.5.tar.gz (7.7MB)
    100% |████████████████████████████████| 7.7MB 46kB/s 
Installing collected packages: django
  Running setup.py install for django
Successfully installed django-1.4.5
[root@localhost data]# 


 error: command 'gcc' failed with exit status 1

解决办法如下:

[root@localhost fuwo]# yum install gcc python-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.6.6-52.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                              Arch                           Version                               Repository                    Size
==============================================================================================================================================
Installing:
 python-devel                         x86_64                         2.6.6-52.el6                          base                         171 k

Transaction Summary
==============================================================================================================================================
Install       1 Package(s)

Total download size: 171 k
Installed size: 456 k
Is this ok [y/N]: y
Downloading Packages:
python-devel-2.6.6-52.el6.x86_64.rpm                                                                                   | 171 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : python-devel-2.6.6-52.el6.x86_64                                                                                           1/1 
  Verifying  : python-devel-2.6.6-52.el6.x86_64                                                                                           1/1 

Installed:
  python-devel.x86_64 0:2.6.6-52.el6                                                                                                          

Complete!
[root@localhost fuwo]# 


 gcc: error trying to exec 'cc1plus': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

解决办法如下

[root@localhost fuwo]# yum install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-11.el6 will be installed
--> Processing Dependency: libstdc++-devel = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
--> Running transaction check
---> Package libstdc++-devel.x86_64 0:4.4.7-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                Arch                          Version                               Repository                   Size
==============================================================================================================================================
Installing:
 gcc-c++                                x86_64                        4.4.7-11.el6                          base                        4.7 M
Installing for dependencies:
 libstdc++-devel                        x86_64                        4.4.7-11.el6                          base                        1.6 M

Transaction Summary
==============================================================================================================================================
Install       2 Package(s)

Total download size: 6.3 M
Installed size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): gcc-c++-4.4.7-11.el6.x86_64.rpm                                                                                 | 4.7 MB     00:01     
(2/2): libstdc++-devel-4.4.7-11.el6.x86_64.rpm                                                                         | 1.6 MB     00:00     
----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                         3.1 MB/s | 6.3 MB     00:02     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libstdc++-devel-4.4.7-11.el6.x86_64                                                                                        1/2 
  Installing : gcc-c++-4.4.7-11.el6.x86_64                                                                                                2/2 
  Verifying  : libstdc++-devel-4.4.7-11.el6.x86_64                                                                                        1/2 
  Verifying  : gcc-c++-4.4.7-11.el6.x86_64                                                                                                2/2 

Installed:
  gcc-c++.x86_64 0:4.4.7-11.el6                                                                                                               

Dependency Installed:
  libstdc++-devel.x86_64 0:4.4.7-11.el6                                                                                                       

Complete!
[root@localhost fuwo]# 

 unable to execute swig: No such file or directory
    error: command 'swig' failed with exit status 1

解决办法如下:

[root@localhost fuwo]# yum install wsig
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
No package wsig available.
Error: Nothing to do
[root@localhost fuwo]# yum install swig
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package swig.x86_64 0:1.3.40-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                        Arch                             Version                                 Repository                      Size
==============================================================================================================================================
Installing:
 swig                           x86_64                           1.3.40-6.el6                            base                           1.1 M

Transaction Summary
==============================================================================================================================================
Install       1 Package(s)

Total download size: 1.1 M
Installed size: 4.1 M
Is this ok [y/N]: y
Downloading Packages:
swig-1.3.40-6.el6.x86_64.rpm                                                                                           | 1.1 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : swig-1.3.40-6.el6.x86_64                                                                                                   1/1 
  Verifying  : swig-1.3.40-6.el6.x86_64                                                                                                   1/1 

Installed:
  swig.x86_64 0:1.3.40-6.el6                                                                                                                  

Complete!




转载于:https://www.cnblogs.com/peerlessmeng/p/4482974.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值