Make Python available on Windows.
Download the necessary files from the following.
Set the following environment variables.
Variable name | value |
---|---|
PYTHON_HOME | C:\Python27 |
Add the following two to path
Folder path |
---|
%PYTHON_HOME% |
%PYTHON_HOME%\Scripts |
> python --version
Python 2.7.6
> python
>>> print "hello, world"
hello, world
>>> exit()
hello.py
print "hello, world"
> python hello.py
hello, world
hello.py
#coding: UTF-8
print "Hello, world"
> python hello.py
Hello, world
Execute the following command in the folder where you downloaded python ez_setup.py.
> python ez_setup.py
.
.
Installed c:\python27\lib\site-packages\setuptools-2.0-py2.7.egg
Processing dependencies for setuptools==2.0
Finished processing dependencies for setuptools==2.0
Execute the following command.
> easy_install pip
.
.
Installed c:\python27\lib\site-packages\pip-1.4.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
Confirmation of installed packages and output example
> pip freeze
Jinja2==2.7.1
MarkupSafe==0.18
Pygments==1.6
Sphinx==1.2
docutils==0.11
Recommended Posts