Oct/30/2018 Updated by

Python

A Handy Way to start WWW Server on your Local Computer


[Up] Japanese English

For Python 3

Installation of Python 3

It is recommended to install python 3 using Anaconda. It runs on both of Windows and Mac. For details of the installation method, please refer http://nw.tsuda.ac.jp/lec/python/anaconda/install/index-en.html.

For Windows, make sure that the path of installing Anaconda is included in the Path environment variable of the System.

Starting WWW Server

Start the WWW server in the folder where the data to be published exists. Use "Command Prompt" on Windows or "Terminal" on Mac to start WWW server.

For Python 3
  cd learning-threejs-master    ← change working directory to the public folder
  python -m http.server 8000    ← start WWW server using python 3

Access using Browser

Access http://localhost:8000/ using Bowser. Chome is recommended.



For Python 2

(注) Python 2 is installed on MacOS by default.

Starting WWW server

[Note] Start WWW server of Python 2 as follows.

for python 2
  cd learning-threejs-master          ← changed working directory to the public folder
  python -m SimpleHTTPServer 8000     ← start WWW server using python 2