Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install python, pip and easy_install in centos6.7

Shulou Source: shulou.com Published: 2022-05-31 21:36:51 10月07日 Update

This article introduces the knowledge of "how to install python, pip and easy_install in centos6.7". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Centos6 comes with python2.6 version. Install python2.7, easy_install-2.7, pip2.7 as needed.

Dependence

Yum groupinstall-y development toolsyum install-y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Install python2.7

Wget https://www.python.org/ftp/python/2.7.11/python-2.7.11.tgztar xvf python-2.7.11.tgzcd python-2.7.11./configure-prefix=/usr/localmake & & make install & & echo ok

The executable directory of the installed python is / usr/local/bin

The path to the python installation directory after installation is / usr/local/lib/python2.7

At this point, you can verify the installation through the python2.7 command

Install setuptools (easy_install-2.7) + pip2.7

Note: be sure to use python2.7 to execute the relevant commands

# download setuptools,easy_install installation package wget https://bootstrap.pypa.io/ez_setup.py# installation easy_install-2.7python2.7 ez_setup.py# installation / usr/local/bin/ directory easy_install-2.7# installation pip2.7easy_install-2.7 pip# installation / usr/local/bin/ directory pip2.7# upgrade pip2.7 version pip2.7 install--upgrade pip

Now the installation of easy_install-2.7 and pip2.7 is complete.

Pip2.7 install [packagename] pip2.7 install-- upgrade [packagename] pip2.7 uninstall [packagename] "how to install python, pip and easy_install in centos6.7" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Catalogue content command more version knowledge practicality achievement next dilemma reality situation documents articles cases editing website so far industry path Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Huawei Docker MySQL