Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pyramid.pdf
Скачиваний:
11
Добавлен:
24.03.2015
Размер:
3.82 Mб
Скачать

2.3. INSTALLING PYRAMID ON A WINDOWS SYSTEM

latex-warning.png

Using --no-site-packages when generating your virtualenv is very important. This flag provides the necessary isolation for running the set of packages required by Pyramid. If you do not specify --no-site-packages, it’s possible that Pyramid will not install properly into the virtualenv, or, even if it does, may not run properly, depending on the packages you’ve already got installed into your Python’s “main” site-packages dir.

latex-warning.png

do not use sudo to run the virtualenv script. It’s perfectly acceptable (and desirable) to create a virtualenv as a normal user.

You should perform any following commands that mention a “bin” directory from within the env virtualenv dir.

2.2.3 Installing Pyramid Into the Virtual Python Environment

After you’ve got your env virtualenv installed, you may install Pyramid itself using the following commands from within the virtualenv (env) directory you created in the last step.

$ cd env

$ bin/easy_install pyramid

The easy_install command will take longer than the previous ones to complete, as it downloads and installs a number of dependencies.

2.3 Installing Pyramid on a Windows System

1. Install, or find Python 2.6 for your system.

25

2.INSTALLING PYRAMID

2.Install the Python for Windows extensions. Make sure to pick the right download for Python 2.6 and install it using the same Python installation from the previous step.

3.Install latest setuptools distribution into the Python you obtained/installed/found in the step above: download ez_setup.py and run it using the python interpreter of your Python 2.6 installation using a command prompt:

c:\> c:\Python26\python ez_setup.py

4. Use that Python’s bin/easy_install to install virtualenv:

c:\> c:\Python26\Scripts\easy_install virtualenv

5. Use that Python’s virtualenv to make a workspace:

c:\> c:\Python26\Scripts\virtualenv --no-site-packages env

6.Switch to the env directory:

c:\> cd env

7.(Optional) Consider using Scripts\activate.bat to make your shell environment wired to use the virtualenv.

8.Use easy_install pointed at the “current” index to get Pyramid and its direct dependencies installed:

c:\env> Scripts\easy_install pyramid

2.4 What Gets Installed

When you easy_install Pyramid, various other libraries such as WebOb, PasteDeploy, and others are installed.

Additionally, as chronicled in Creating a Pyramid Project, scaffolds will be registered, which make it easy to start a new Pyramid project.

26

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]