Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS x86 64bit upgrade to 2.7 Python2.6     - VNC connection VMware vSphere ESXi 5.5 (Linux)

- Management DB2 logs (Database)

- Five programming fallacy (Programming)

- Build ftp server under CentOS 6.5 (Server)

- Ubuntu and Derivative Edition users install LMMS 0.4.15 (Linux)

- CentOS7 complete step to install Hadoop2.7 (Server)

- Teach you how to protect the security of Linux desktop (Linux)

- Ubuntu 14.04 install the NVIDIA driver + CUDA + MATLAB (Linux)

- Bash variable expansion modifier (Programming)

- Linux Security trust with users (Linux)

- Elementary OS Freya global menu (Linux)

- Android custom ViewPager create kaleidoscopic image transition effects (Programming)

- Export error: ORA-04063: package body dmsys dbms dm model exp has error (Database)

- Sublime Text 3 practical functions and shortcut keys used to collect (Linux)

- Mhddfs: multiple smaller partitions into one large virtual storage (Linux)

- Experience RHEL7 new features (Linux)

- Two classic macro definition under Linux (Linux)

- Commentary Apache + Tomcat + JK implement Tomcat clustering and load (Server)

- VirtualBox snapshots (Linux)

- php security study (Linux)

 
         
  CentOS x86 64bit upgrade to 2.7 Python2.6
     
  Add Date : 2017-08-31      
         
         
         
  Since the project uses Django1.7.1, It works with Python 2.7,3.2, 3.3, or 3.4, and my CentOS x86 64bit system comes with Python version 2.6.6, so the need to upgrade to version Python2.7.

Upgrade reference online 3 article complete, just need to pay attention to three points:

(1) because some of the existing software system is dependent python2.6.6, it can not be re-installed after uninstalling the existing version python2.7, otherwise directly after upgrade to python2.7 may cause yum and so can not be used.

(2) In order to avoid entering the python interpreter environment arrow keys distortion of the issue, it is best to confirm before the upgrade is installed readline-devel module.

(3) After the upgrade is complete, enter the python interpreter to perform import django, the incorrect report: ImportError: No module named django.

See the article: http: //stackoverflow.com/questions/9462212/import-error-no-module-named-django, set the environment variable: PYTHONPATH can be solved.

PS: If you use pip install Django, you can execute the following command to view the current installation directory of Django:

pip show Django

(4) In addition, after the upgrade is complete and encounter new problems. Executive: "django-admin.py startproject ttt" when being given:

Traceback (most recent call last):
  File "/usr/bin/django-admin.py", line 5, in
    management.execute_from_command_line ()
  File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 385, in

execute_from_command_line
    utility.execute ()
  File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 354, in

execute
    django.setup ()
  File "/usr/lib/python2.6/site-packages/django/__init__.py", line 18, in setup
    from django.utils.log import configure_logging
  File "/usr/lib/python2.6/site-packages/django/utils/log.py", line 13, in
    from django.views.debug import ExceptionReporter, get_exception_reporter_filter
  File "/usr/lib/python2.6/site-packages/django/views/debug.py", line 10, in
    from django.http import (HttpResponse, HttpResponseServerError,
  File "/usr/lib/python2.6/site-packages/django/http/__init__.py", line 2, in
    from django.http.request import (HttpRequest, QueryDict,
  File "/usr/lib/python2.6/site-packages/django/http/request.py", line 12, in
    from django.core import signing
  File "/usr/lib/python2.6/site-packages/django/core/signing.py", line 41, in
    import zlib
ImportError: No module named zlib

Because of the lack zlib-devel package, the solution is as follows:

Install zlib-devel package
shell> sudo yum install zlib-devel

Recompile install Python
shell> ./ configure --with-zlib
shell> make
shell> sudo make install

When you install MySQLdb module, always being given, then see a word in the file setup.cfg:

build-requires = python-devel mysql-devel zlib-devel openssl-devel

It relies decisively to install packages:

yum install python-devel mysql-devel zlib-devel openssl-devel

OK! The problem is solved.
     
         
         
         
  More:      
 
- Git Getting Started tutorial (Linux)
- Java Learning: elegant string (Programming)
- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)
- Linux OOM killer mechanism (Linux)
- NFS-based services and service utilization Corosync DRBD high availability cluster configuration, respectively (Server)
- AWR Report (Database)
- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)
- Boot-Repair Tool - repair of frequent start-up problems (Linux)
- VirtualBox install Windows 8.1 has encountered an error 0x000000C4 solutions (Linux)
- IP configuration under Linux (Linux)
- Build RPM package uses Docker mirror (Linux)
- Clojure programming languages: take full advantage of the Clojure plug-in Eclipse (Programming)
- Use ldap implement Windows Remote Desktop Ubuntu Linux (Linux)
- Oracle database physical file backup / restore (Database)
- The basic principles of AIX system security (Linux)
- Sort search algorithm Java - application examples with recursive dichotomy (Programming)
- Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)
- How to upgrade to Ubuntu 14.04 Linux Kernel 4.4.1 LTS (Linux)
- To install and deploy PHP environment under the CentOS (Server)
- Source code to compile and install MySQL 5.7.9 (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.