Ubuntu installation pip+python27+ipython+scrapy+zlib-and all kinds of problems encountered in solving __python

Source: Internet
Author: User
Tags unpack
===================== (starting from the middle of the article for a properly installed solution) = = = = = (1) # xz-d PYTHON-2.7.11.TAR.XZ # tar xvf Python-2.7.11.tar # CD Python-2. 7.11/#/configure && make install (2): ~$ sudo apt-get install python-setuptools-------------------- -(Zipimporterror Error solution on the Web)-Zipimport. Zipimporterror:can ' t decompress data; Zlib not available if the procedure reports: Zlib package, then you need to do first: Yum install zlib zlib-devel, install zlib, and then recompile install Python finally set the environment variable, the PIP default installation is the current version Pytho n Directory, so setting this directory to an environment variable raini@biyuzhe:/usr/lib/python2.7/dist-packages$ sudo rm-rf/pip-1.5.4.egg-info (3)------ ----------(download source to install Zlib package)---------------tried sudo apt-get install zlib, it seems that the Ubuntu official source does not contain zlib software package, only to the Zlib official website: http://

Www.zlib.net Download the source code to install the Zlib package.
The latest version of zlibzlib-1.2.8, installation, $wget http://www.zlib.net/zlib-1.2.8.tar.gz $tar-xvzf zlib-1.2.8.tar.gz $cd zlib-1.2.8.tar.gz $./configure $make $sudo make install-------------(test method provided on the website)-----------upgrading pip on Linux or OS X:pip Inst All-u Pip (4)------------------------python install EASThe Y_install and Pip Easy_install and Pip are used to download the first installation Easy_install download address of the associated resource bundle PyPI a common repository of Python: Https://pypi.python.org/pypi

	/ez_setup decompression, installation. raini@biyuzhe:~/app/ez_setup-0.9$ sudo python ez_setup.py after installing Easy_install--(install PIP)---download address: https://pypi.python.o

	RG/PYPI/PIP decompression, installation. raini@biyuzhe:~/app/pip-8.1.1$ sudo python setup.py install ========================== () =============== (split line) ======= =============---------(-ubuntu with importerror:cannot import name Httpshandl after installing the PIP):--Resolving:---sudo apt-get install op Enssl---sudo apt-get install Libssl-dev (RedHat, CentOS is openssl-devel) The following packages have unsatisfied dependencies: Libssl-dev: Reliance: libssl1.0.0 ( = 1.0.1f-1ubuntu2.18) But 1.0.1f-1ubuntu9.8 is about to be installed recommend: Libssl-doc but it will not be installed E: cannot fix the error because you want some packages to remain the same, that is, they destroy the software

dependencies between packages. Reason: The installed libssl1.0.0 version is too high to support-----(view current Libssl-dev version condition)---------raini@biyuzhe:~$ dpkg-l *libssl* Expected status = Unknown (u)/install (i)/delete (r)/clear (p)/Hold (h) | Status = Not installed (n)/installed (i)/save only configuration (c)/decompression (U)/configuration failed (F)/Incomplete Install (H)/Trigger Wait (W)/Trigger Pending (T) |/error? = (none)/must Reload (R) (formState, error: Uppercase = fault) | |  /Name Version Schema: Description +++-==============-============-============-================================= II Libssl1.0.0:am 1.0.1f-1ubun amd64 Secure Sockets Layer toolkit-sh------------------------(--Solution (note options): 1.- ---(Install aptitude)-----Use the Aptitude Package Manager $sudo apt-get install aptitude 2.

Using aptitude to install Libssl-dev packages, use the recommended solution (demote the libssl1.0.0 version)-----------raini@biyuzhe:~$ sudo apt-get install Reading Package List ... Completing the dependency tree that is analyzing the package is reading status information ...
Completion of the aptitude is already the latest version.
0 packages were upgraded, 0 new packages were installed, 0 packages were uninstalled, and 74 packages were not upgraded.         
  raini@biyuzhe:~$ sudo aptitude install Libssl-dev The following "new" packages will be installed.
LIBSSL-DEV{B} libssl-doc{a 0 Packages are upgraded, 2 new installations, 0 will be deleted, and 74 will not be upgraded. You need to obtain an archive of 2,036 KB.
7,819 KB will be used after the package is unpack.
The following packages have unsatisfied dependencies: Libssl-dev: dependent: libssl1.0.0 (= 1.0.1f-1ubuntu2.18) but 1.0.1f-1ubuntu9.8 installed. The following actions resolve these dependencies: keep the following packages in their current version: 1 Libssl-dev [not installed] accept the solution. [y/n/q/?]                         n the following actions resolve these dependencies: demote the following packages:                                 
1) libssl1.0.0 [1.0.1f-1ubuntu9.8 (now)-> 1.0.1f-1ubuntu2.18 (Trusty-securi whether to answer Affected by the solution. [y/n/q/?]
  Y the following packages will be "degraded": libssl1.0.0 the following "new" packages will be installed.
Libssl-dev Libssl-doc{a} 0 Packages are upgraded, 2 new installations, 1 degraded, 0 will be deleted, and 74 will not be upgraded. You need to obtain an archive of 2,866 KB.
7,783 KB will be used after the package is unpack. Do you want to continue? [y/n/?] Y read: 1 http://mirrors.163.com/ubuntu/trusty-security/main libssl1.0.0 amd64 1.0.1f-1ubuntu2.18 [830 KB] read: 2 Http://mir Rors.163.com/ubuntu/trusty-security/main libssl-dev amd64 1.0.1f-1ubuntu2.18 [1,071 KB] read: 3 http://mirrors.163.com/                                           
Ubuntu/trusty-security/main Libssl-doc all 1.0.1f-1ubuntu2.18 [966 kb] downloaded 2,866 KB, takes 14 seconds (197 kb/s) Preset package ... dpkg: Warning: libssl1.0.0:amd64 from 1.0.1f-1ubuntu9.8 to 1.0.1f-1ubuntu2.18 (database is being read ...). . The system currently has a total of 208,325 files and directories installed.
is preparing to unpack .../libssl1.0.0_1.0.1f-1ubuntu2.18_amd64.deb ...
LIBSSL1.0.0:AMD64 (1.0.1f-1ubuntu2.18) is being extracted to (1.0.1f-1ubuntu9.8) ...
Selecting an unselected package libssl-dev:amd64. Preparing to unpack .../libssl-dev_1.0.1f-1ubuntu2.18_amd64.deb ...
Unpack Libssl-dev:amd64 (1.0.1f-1ubuntu2.18) ...
Selecting an unselected package Libssl-doc.
Preparing to unpack .../libssl-doc_1.0.1f-1ubuntu2.18_all.deb ...
Unpack Libssl-doc (1.0.1f-1ubuntu2.18) ...
Processing triggers for man-db (2.7.0.2-2) ...
Setting Libssl1.0.0:amd64 (1.0.1f-1ubuntu2.18) ...
Setting Libssl-dev:amd64 (1.0.1f-1ubuntu2.18) ...
Setting Libssl-doc (1.0.1f-1ubuntu2.18) ... Processing triggers for Libc-bin (2.19-10ubuntu2.3) ...----(Verify Libssl-dev Package Installation _: raini@biyuzhe:~$ dpkg-l *libssl * Expected status = Unknown (u)/install (i)/delete (R)/purge (p)/Keep (h) | Status = Not installed (n)/installed (i)/save only configuration (c)/decompression (U)/configuration failed (F)/Incomplete Install (H)/Trigger Wait (W)/Trigger Pending (T) |/error? = (none)/must Reload (R) (Status, error: Uppercase = fault) | |  /Name Version Schema: Description +++-==============-============-============-================================= II LIBSSL-DEV:AMD 1.0.1f-1ubun amd64 Secure Sockets Layer toolkit-de II Libssl-doc 1.0.1f-1ubun all Se Cure Sockets Layer Toolkit-de II libssl1.0.0:am 1.0.1f-1ubun amd64 Secure Sockets Layer toolkit-sh-----(re-Install libssl-dev)------raini@biyuzhe:~$ sudo apt-get install Libssl-dev is reading the package list ... Completing the dependency tree that is analyzing the package is reading status information ...
Completion of the Libssl-dev is already the latest version.



0 packages were upgraded, 0 new packages were installed, 0 packages were uninstalled, and 74 packages were not upgraded.

                  -----(Recompile install Python)--root@biyuzhe:/home/raini/app/python-2.7.11#./configure--prefix=/usr/local/python 
# make && make install-----(replace system with Python)--root@biyuzhe:/home/raini/app/python-2.7.11# python-v python 2.7.11 root@biyuzhe:/home/raini/app/python-2.7.11# mv/usr/bin/python/usr/bin/python2.6 root@biyuzhe:/home/raini/app/ python-2.7.11# Ln-sf/usr/local/python/bin/python2.7/usr/bin/python (so you don't have to start with sudo python)-----(reinstall PIP)---Root@bi yuzhe:/home/raini/app/pip-8.1.1# python setup.py Install ====================================

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.