Changeset 4554
- Timestamp:
- 05/01/08 12:12:43 (3 months ago)
- Files:
-
- trunk/docs/2.0/DownloadInstall.rst (modified) (5 diffs)
- trunk/docs/2.0/index.rst (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/2.0/DownloadInstall.rst
r4370 r4554 1 2 3 4 How to install TurboGears 2 1 How to install TurboGears 2 5 2 ============================= 6 3 … … 9 6 We do expect to have a technology preview release sometime soon, and that should provide a clear picture of the TurboGears 2 stack, and a slightly more stable API. However, if you want API stability and good documentation, you may want to consider building your application on TurboGears 1 and porting it to TG2 after it is officially released. 10 7 8 Installing Pylons: 9 ----------------------- 10 11 You could easy_install pylons with command:: 12 13 $ easy_install -f http://pylonshq.com/download/0.9.7 -U Pylons 14 11 15 Installing Pylons from Source: 12 ------------------------------ 16 -------------------------------- 13 17 14 Pylons uses the Mercurial Version control system, so you probably need to install Mercurial before you can pull down the latest development source for Pylons. Mercurial `packages are available <http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages>`_ for Windows, Mac OSX, and other OS's. 18 .. note:: If you've installed pylons in previous section, you could skip to next section. 19 20 Pylons uses the Mercurial Version control system, so if you want to install from repository, you probably need to install Mercurial before you can pull down the latest development source for Pylons. Mercurial `packages are available <http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages>`_ for Windows, Mac OSX, and other OS's. 15 21 16 22 First you need to install: … … 24 30 $ hg clone http://pylonshq.com/hg/pylons-dev Pylons 25 31 32 26 33 To tell setuptools to use the version you are editing in the Pylons directory:: 27 34 28 $ cd Pylons 29 $ python setup.py develop 35 $ cd Pylons 36 $ python setup.py develop 37 30 38 31 39 **Mac OSX Leopard** comes with Python 2.5 but does not include **setuptools**. Install it using the instructions above. 32 40 33 **Cygwin** does not include the necessary binary file **sqlite3.dll**; if you want to run cygwin you'll need 34 to install a different database. If you have cygwin installed and you want to use the default setup described 35 here, you must perform all operations, including setup operations, within DOS command windows, not cygwin command windows. 41 **Cygwin** does not include the necessary binary file **sqlite3.dll**; if you want to run cygwin you'll need to install a different database. If you have cygwin installed and you want to use the default setup described here, you must perform all operations, including setup operations, within DOS command windows, not cygwin command windows. 36 42 37 43 Now you can make changes to the files in the Pylons directory and the code will run exactly as if you had installed a version of the egg with the changes you have made. 38 44 39 45 Installing TurboGears 2 from Source: 40 ------------------------------------ 46 -------------------------------------- 47 48 TurboGears 2 are constructed by a bunch of packages. 41 49 42 50 Check out the latest code from subversion:: 43 51 44 52 $ cd .. 45 $ svn co http://svn.turbogears.org/trunk tg2 53 $ svn co http://svn.turbogears.org/projects/tg.devtools/trunk tgdev 54 $ svn co http://svn.turbogears.org/trunk tg2 55 $ svn co http://svn.turbogears.org/projects/tgrepozewho/trunk tgrepozewho 46 56 47 Then you repeat the same steps to tell setuptools/python to use the new tg2 installation:: 57 tg2 package is TurboGears 2 core. Others are paster command plugins to create default template, admin interface, and migrations. 48 58 49 $ cd tg2 59 Then you repeat the same steps to tell setuptools/python to use the new tg2 installation. 60 61 Install tgrepozewho:: 62 63 $ cd tgrepozewho 50 64 $ python setup.py develop 51 65 52 Then you have installed TurboGears 2. 66 Install TurboGears 2 server:: 67 68 $ cd .. 69 $ cd tg2 70 $ python setup.py develop 71 72 Install TurboGears 2 developer tools:: 73 74 $ cd .. 75 $ cd tgdev 76 $ python setup.py develop 77 78 Then you have installed TurboGears 2. 79 80 .. note:: if you have installed old dependency packages, you could remove them from:: 81 82 {python_path}/site-packages/easy_install.pth 83 53 84 54 85 Validate the installation: 55 ---------------------------- --------86 ---------------------------- 56 87 57 88 To check if you installed TurboGears 2 correctly, type:: 58 89 59 paster --help90 $ paster --help 60 91 61 92 and you'll see a new "TurboGears2" command section in paster help. … … 63 94 Paster has replaced the old tg-admin command, and most of the tg-admin commands have now been reimplemented as paster commands. For example, "tg-admin quickstart" command has changed to "paster quickstart" command, and "tg-admin info" command has changed to "paster tginfo" command. 64 95 65 Be sure to check out our `What's new in TurboGears 2.0 < RoughDocs/WhatsNew>`_ page to get a picture of what's changed in TurboGears2 so far.96 Be sure to check out our `What's new in TurboGears 2.0 <2.0/RoughDocs/WhatsNew>`_ page to get a picture of what's changed in TurboGears2 so far. 66 97 67 98 Troubleshooting 68 --------------- 99 ---------------- 69 100 70 101 If you get an error about ``ObjectDispatchController`` this means your Pylons installation is out-of-date. Make sure it's fresh ("hg pull -u" or "hg pull" followed by hg update -- alternatively you can create a brand new Pylons branch in a new directory with "hg clone"). … … 72 103 When installing on Mac OSX, if you get an error mentioning "No local packages or download links found for RuleDispatch", you can try the solution posted to the `ToscaWidgets discussion list <http://groups.google.com/group/toscawidgets-discuss/browse_thread/thread/cb6778810e96585d>`_, which advises downloading it directly:: 73 104 74 $ sudo easy_install -U -f http://toscawidgets.org/download/wo_speedups/ RuleDispatch 75 76 105 . $ sudo easy_install -U -f http://toscawidgets.org/download/wo_speedups/ RuleDispatch 77 106 If you get the following error when starting a project with ``paster serve``:: 78 107 79 AttributeError: 'WSGIRequest' object has no attribute 'accept_language' 80 108 . AttributeError: 'WSGIRequest' object has no attribute 'accept_language' 81 109 update your Pylons checkout with ``hg update`` and try again. 82 110 83 111 If ``python setup.py develop`` gives you:: 84 112 85 Traceback (most recent call last): 86 File "setup.py", line 3, in <module> 87 from ez_setup import use_setuptools 113 . Traceback (most recent call last): 114 . File "setup.py", line 3, in <module> 115 . from ez_setup import use_setuptools 116 88 117 89 118 ... commenting out the first two lines in setup.py seems to work. See `this discussion <http://groups.google.com/group/pylons-discuss/browse_thread/thread/1ccf9366004c8e11>`_ 119 120 It is possible you might see a few other error messages. Here are the correct way to fix the dependency problems so things will install properly. 121 122 If you get this error about PyProtocols:: 123 124 error: Could not find suitable distribution for Requirement.parse('PyProtocols>=1.0a0dev-r2302') 125 126 Then do this:: 127 128 $ wget http://dbsprockets.googlecode.com/files/PyProtocols-1.0a0dev-r2302.zip 129 $ unzip PyProtocols-1.0a0dev-r2302.zip 130 $ cd PyProtocols-1.0a0dev-r2302 131 $ python setup.py develop 132 133 134 If you get this error about RuleDispatch:: 135 136 error: Could not find suitable distribution for Requirement.parse('RuleDispatch>=0.5a0.dev-r2306') 137 138 Then you need to do the following:: 139 140 $ cd .. 141 $ wget http://dbsprockets.googlecode.com/files/RuleDispatch-0.5a0.dev-r2306.tar.gz 142 $ tar xzf RuleDispatch-0.5a0.dev-r2306.tar.gz 143 $ cd RuleDispatch-0.5a0.dev-r2306 144 $ python setup.py develop 145