Pip installs MySQLdb and Django

Source: Internet
Author: User
Tags deprecated

" HTTPS://PYPI.PYTHON.ORG/PACKAGES/SOURCE/P/PIP/PIP-1.5.4.TAR.GZ#MD5=834B2904F92D46AAA333267FB1C922BB " --no-check-certificate
[[Email protected] ~] #tar-XVF pip-1.5.4.tar.gz
[[email protected] pip-1.5.4] #python setup.py Install
1. PIP Usage details

1.1 PIP installation Package

Django  
Mysql-python

1. 2 PIP View installed packages

[[Email protected] ~] # PIP List Mysql-python (1.2.5)            //mysqldb pip (1.5.4) redis (2.10.5) setuptools(23.1. 0) Wsgiref ( 0.1.2)

1.3 PIP checks which packages need to be updated

[[Email protected] ~] # pip list--outdatedpip (current:1.5.4 latest:8.1.2)

1.4 Pip Upgrade Pack

[[Email protected] ~] # pip install--upgrade Redis  in/usr/local/lib/python2.7/site-packagescleaning ...

1.5 Pip Offload Package

[[Email protected] ~]#pip Uninstall RedisUninstalling Redis:/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/Description.rst/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/METADATA/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/RECORD/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/WHEEL/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/Metadata.json/usr/local/lib/python2.7/site-packages/redis-2.10.5.dist-info/Top_level.txt/usr/local/lib/python2.7/site-packages/redis/__init__. PY/usr/local/lib/python2.7/site-packages/redis/__init__. PYc/usr/local/lib/python2.7/site-packages/redis/_compat.py/usr/local/lib/python2.7/site-packages/redis/_compat.pyc/usr/local/lib/python2.7/site-packages/redis/client.py/usr/local/lib/python2.7/site-packages/redis/Client.pyc/usr/local/lib/python2.7/site-packages/redis/connection.py/usr/local/lib/python2.7/site-packages/redis/Connection.pyc/usr/local/lib/python2.7/site-packages/redis/exceptions.py/usr/local/lib/python2.7/site-packages/redis/Exceptions.pyc/usr/local/lib/python2.7/site-packages/redis/lock.py/usr/local/lib/python2.7/site-packages/redis/Lock.pyc/usr/local/lib/python2.7/site-packages/redis/sentinel.py/usr/local/lib/python2.7/site-packages/redis/Sentinel.pyc/usr/local/lib/python2.7/site-packages/redis/utils.py/usr/local/lib/python2.7/site-packages/redis/utils.pycproceed (y/N)? Y successfully uninstalled Redis

2. Pip parameter explanation
[[Email protected] ~]#Pip--helpUsage:pip<command>[Options]commands:install Install packages.  Uninstall Uninstall packages. Freeze Output Installed Packagesinchrequirements format.  List List installed packages.  Show show information about installed packages. Search Search PyPI forpackages. Wheel Build Wheels fromyour requirements. Zip DEPRECATED.  Zip individual packages. Unzip DEPRECATED.  Unzip individual packages. Bundle DEPRECATED.  Create Pybundles. Help Show Help forcommands. General Options:-H,--Help Show Help. -V,--verbose Give more output. Option isAdditive andCan is used up to 3Times . -V,--version Show version andexit. -Q,--quiet Give less output. --log-file <path> Path to a verbose non-appending log, which is only logs failures. This log isActive by default at/root/.pip/Pip.log.--log <path> Path to a verbose appending log. This log isinactive by default. --proxy <proxy> Specify a proxyinchThe form [User:[email protected]]proxy.server:port. --timeout <sec> Set The socket timeout (default 15seconds). --exists-action <action>Default action when a path already exists: (s) witch, (i) Gnore, (W) Ipe, (b) ackup. --cert <path> Path to alternate CA bundle.

[[email protected] lib.linux-x86_64-2.7]#pythonPython 2.7.9 (default, Mar 20 2016, 17:45:53) [GCC4.1.2 20080704 (Red Hat 4.1.2-55)] on Linux2type" Help","Copyright","credits" or "License"  forMore information.>>>ImportMysqldbtraceback (most recent): File"<stdin>", Line 1,inch<module>File"mysqldb/__init__.py", line 19,inch<module>Import_mysqlimporterror:libmysqlclient.so.18:cannot open Shared object file:no such fileorDirectory

Solve:

Ln-s/usr/local/mysql56/lib/libmysqlclient.so.18/usr/lib/libmysqlclient.so.18-s/usr/local/mysql56/lib/ libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18

vi/etc/ld.so.conf//Join libmysqlclient.so.18 directory:/usr/local/mysql56/lib/

Join:/usr/lib/

Save exit after execution/sbin/ldconfig effective



Pip installs MySQLdb and Django

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.