linuxЧÀÍÆ÷ÔõôװÖÃpip
ÒªÔÚ linux ЧÀÍÆ÷ÉÏ×°Öà pip£¬Ê×ÏÈÈ·±£ÒÑ×°Öà python£¨°æ±¾ÖÁÉÙΪ 2.7 »ò 3.4£©£¬È»ºóʹÓà easy_install ×°Öà pip¡£È·ÈÏ×°ÖÃÀֳɺ󣬼´¿ÉʹÓà pip ×°Öá¢Éý¼¶ºÍжÔØ python °ü¡£
ÔÚ Linux ЧÀÍÆ÷ÉÏ×°Öà pip
pip ÊÇ Python °ü¹ÜÀíϵͳ£¬ÓÃÓÚ×°Öá¢Éý¼¶ºÍɾ³ý Python °ü¡£ÒÔÏÂÊÇÔõÑùÔÚ Linux ЧÀÍÆ÷ÉÏ×°Öà pip£º
°ì·¨ 1£ºÈ·±£ÒÑ×°Öà Python
È·±£Ð§ÀÍÆ÷ÒÑ×°Öà Python£¬°æ±¾²»µÍÓÚ 2.7 »ò 3.4¡£Òª¼ì²é Python °æ±¾£¬ÇëÔÚÖÕ¶ËÖÐÔËÐУº
python --version
µÇ¼ºó¸´ÖÆ
ÈôÊÇδװÖà Python£¬ÇëʹÓÃÒÔÏÂÏÂÁî¾ÙÐÐ×°Öã¨Æ¾Ö¤ÄúʹÓÃµÄ Linux ¿¯Ðаæ¾ÙÐÐÑ¡Ôñ£©£º
Ubuntu/Debian£ºsudo apt install python3-pip
CentOS/Red Hat£ºsudo yum install python3-pip
°ì·¨ 2£ºÊ¹Óà easy_install ×°Öà pip
easy_install ÊÇ Python µÄÁíÒ»¸ö°ü¹ÜÀíϵͳ£¬¿ÉÓÃÓÚ×°Öà pip¡£ÔËÐÐÒÔÏÂÏÂÁ
sudo easy_install pip
µÇ¼ºó¸´ÖÆ
°ì·¨ 3£ºÈ·ÈÏ pip ÒÑ×°ÖÃ
ҪȷÈÏ pip ÊÇ·ñÀÖ³É×°Öã¬ÇëÔËÐÐÒÔÏÂÏÂÁ
pip --version
µÇ¼ºó¸´ÖÆ
ÄúÓ¦¸Ã»á¿´µ½ pip µÄÒÑ×°Öð汾¡£
ʹÓà pip ×°ÖúÍÖÎÀí Python °ü
×°Öà pip ºó£¬Äú¾Í¿ÉÒÔʹÓÃËüÀ´×°ÖúÍÖÎÀí Python °ü¡£Òª×°Öðü£¬ÇëÔËÐÐÒÔÏÂÏÂÁ
pip install <package_name></package_name>
µÇ¼ºó¸´ÖÆ
ÀýÈ磬ҪװÖà Django£¬ÇëÔËÐУº
pip install django
µÇ¼ºó¸´ÖÆ
ÒªÉý¼¶°ü£¬ÇëÔËÐУº
pip install <package_name> --upgrade</package_name>
µÇ¼ºó¸´ÖÆ
ҪжÔØ°ü£¬ÇëÔËÐУº
pip uninstall <package_name></package_name>
µÇ¼ºó¸´ÖÆ
ÒÔÉϾÍÊÇlinuxЧÀÍÆ÷ÔõôװÖÃpipµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡