python 2.7 Python 2.7 environment configuration of the installation (64 win10)

Original Address: the Python 2.7 installation (64 win10)

Python 2.7.12

Download: https: //www.python.org/downloads/

Installation path D: \ Program Files \ Python27

python environment is relatively simple to install, download python locale windows version of the msi format file, double-click the downloaded installation.

Select add the path to the system during installation, the environment variable Path been automatically added D python installation path: \ Program Files \ Python27

Run cmd, to test the command line

As shown in the figure above, through the python command, and then outputs the classic Hello, world !, python represents the locale has been successfully installed.

Use IDLE python program can be compiled.

setuptools installation and pip: This can be achieved automatically installed subsequent related components, but need to manually download the components in Windows, to install and run through the python setup.py.

Installation is unzip the downloaded installation package, enter setuptools directory, open cmd, run python setup.py install command to install.

setuptools 28.6.1

setuptools is Python Enterprise Application Kit (PEAK) of a sub-project, which is an enhanced set of tools for Python distutilsde tools (applicable to the above version 2.3.5 Python, 64-bit platform is applicable to more than 2.4 version of Python), you can let programmers more easily create and publish Python packages, especially those with conditions dependent on other packages.

Download: https://pypi.python.org/pypi/setuptools

Installation is open cmd, enter the setuptools extract the directory D: \ python64 \ setuptools-28.6.1, run python setup.py install command to install.

After the installation is complete, you can enter to see if there easy_install.exe Scripts directory under the installation directory python, there it means the installation was successful. Scripts then also be added to the path environment variable.

(Note: setuptools installation is complete, the next figure is not the last three, pip pip relevant content is installed after the emergence)

pip

Download the latest version pip, using python setup.py install command to install.

pip 8.1.2

Download: https: //pypi.python.org/pypi/pip#downloads

Unzip the folder, find setup.py, enter cmd, using python setup.py install command to install.

 

May not be mounted, pip input command output follows :( this is not the attempt is successful)

D:\python64\setuptools-28.6.1>pip

 

Usage:

pip <command> [options]

 

Commands:

install Install packages.

download Download packages.

uninstall Uninstall packages.

freeze Output installed packages in requirements format.

list List installed packages.

show Show information about installed packages.

search Search PyPI for packages.

wheel Build wheels from your requirements.

hash Compute hashes of package archives.

completion A helper command used for command completion

help Show help for commands.

 

General Options:

-h, --help Show help.

--isolated Run pip in an isolated mode, ignoring

environment variables and user configuration.

-v, --verbose Give more output. Option is additive, and can be

used up to 3 times.

-V, --version Show version and exit.

-q, --quiet Give less output.

--log <path> Path to a verbose appending log.

--proxy <proxy> Specify a proxy in the form

[user:passwd@]proxy.server:port.

--retries <retries> Maximum number of retries each connection should

attempt (default 5 times).

--timeout <sec> Set the socket timeout (default 15 seconds).

--exists-action <action> Default action when a path already exists:

(s)witch, (i)gnore, (w)ipe, (b)ackup.

--trusted-host <hostname> Mark this host as trusted, even though it does

not have valid or any HTTPS.

--cert <path> Path to alternate CA bundle.

--client-cert <path> Path to SSL client certificate, a single file

containing the private key and the certificate

in PEM format.

--cache-dir <dir> Store the cache data in <dir>.

--no-cache-dir Disable the cache.

--disable-pip-version-check

Don't periodically check PyPI to determine

whether a new version of pip is available for

download. Implied with --no-index.

但使用pip时会出现更新提示。

You are using pip version 8.1.1, however version 8.1.2 is available.

You should consider upgrading via the 'python -m pip install --upgrade pip' command.

因此,使用python -m pip install --upgrade pip进行pip更新,

 

常见pip用法如下:

pip install numpy --安装包numpy

pip uninstall numpy --卸载包numpy

pip show --files PackageName --查看已安装包

pip list outdated --查看待更新包信息

pip install --upgrade numpy --升级包

pip install -U PackageName --升级包

pip search PackageName --搜索包

pip help --显示帮助信息

Guess you like

Origin www.cnblogs.com/mumu122GIS/p/11236488.html