Installing Orbited on Windows ¶

本文档详细介绍了如何在Windows上安装Orbited,包括安装Python、Twisted等依赖项,以及通过官方版本或开发版本安装Orbited的具体步骤。此外还提供了安装验证方法及一些后续配置建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Installing Orbited on Windows

Orbited is written in Python and requires Python 2.5 or newer (for a workaround for <2.5, see ticket #24 and this discussion). Orbited also requires Twisted, which it installs automatically on most platforms (and is otherwise installed trivially). Additionally, from 0.5 and onwards Orbited enables a revolutionary interaction model centered around the TCPSocket.

Python
  1. First of all, let's install Python. Download and run the installer.
  1. In order to call Python and Python scripts from the command line without specifying the directory every time, you have to add 2 directories to the Windows path list. In Windows XP/2000 you go to System Properties-->Advanced-->Environment Variables, and in the System Variables section scroll down to "Path" and click edit. There will be a list of directories separated by semicolons in the Variable Value Field. Add the the directory where you installed Python as well as the Python scripts directory to this list using semicolon separators and click OK. Example:

Before:

%SystemRoot%/system32;%SystemRoot%;

After:

%SystemRoot%/system32;%SystemRoot%;C:/Python25;C:/Python25/scripts
Twisted

Twisted is a dependency of Orbited 0.6. Installers are available on their website.

Orbited

There are two ways to install Orbited itself: from an official release and from the development version.

Installing an Official Release

Although it is not required, setuptools is by far the easiest way to get an official release of Orbited running.

1. Download ez_setup.py

2. Go to a command line, navigate to the directory containing ez_setup.py, and type:

python ez_setup.py setuptools

Then, to install orbited, go to a command line and type:

easy_install orbited

The configuration file for 0.6 is located at /trunk/daemon/orbited.cfg The configuration file must be downloaded separately from SVN and placed in the following directory, which you should create:

/Program Files/Orbited/etc/
Installing the Development Version

The first step is to checkout the development version from the repository using svn:

svn checkout http://orbited.org/svn/orbited/trunk/ [path]

Export the folder to a new folder. This is necessary because of an issue with Orbited and setuptools. If you don't do this the install will fail with the error nameerror: global name 'log' is undefined.

svn export [SVN DIRECTORY] [TARGET DIRECTORY]

Then run the following command from the directory you checked out Orbited to:

python setup.py install

The configuration file orbited.cfg in the main checkout directory needs to be copied to /Program Files/Orbited/etc/

Verify the Installation Works

To make sure the installation was successful, run this simple test:

Enter your Python interpreter:

python

See whether Orbited loads:

import orbited

If you don't see an error, the installation worked! Now you can run Orbited by exiting the Python interpreter and typing orbited (see Deployment for more details). Check out the demos and tests by going to http://localhost:8000/static (replace localhost with a different address if necessary). Orbited can be configured by editing the orbited.cfg file.

Post-Installation Notes

Orbited encodes data as JSON, using a library called demjson. If you are looking for ways to speed up your project, try installing a super-fast C-based JSON library such as cjson or simplejson. Remember easy_install? It works here, too:

easy_install cjson

or

easy_install simplejson

Orbited is installed, and you're ready to build fast, scalable, cutting-edge network applications for the web. Congratulations!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值