summaryrefslogtreecommitdiff
path: root/docs/narr/install.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/install.rst')
-rw-r--r--docs/narr/install.rst91
1 files changed, 45 insertions, 46 deletions
diff --git a/docs/narr/install.rst b/docs/narr/install.rst
index c467779f4..9bc62dc62 100644
--- a/docs/narr/install.rst
+++ b/docs/narr/install.rst
@@ -14,8 +14,8 @@ run :app:`Pyramid`.
.. sidebar:: Python Versions
- As of this writing, :app:`Pyramid` has been tested under Python 2.6.8,
- Python 2.7.3, Python 3.2.3, and Python 3.3b1. :app:`Pyramid` does not
+ As of this writing, :app:`Pyramid` has been tested under Python 2.6,
+ Python 2.7, Python 3.2, and Python 3.3. :app:`Pyramid` does not
run under any version of Python before 2.6.
:app:`Pyramid` is known to run on all popular UNIX-like systems such as
@@ -88,17 +88,15 @@ using the following commands:
.. code-block:: text
- [chrism@vitaminf ~]$ cd ~
- [chrism@vitaminf ~]$ mkdir tmp
- [chrism@vitaminf ~]$ mkdir opt
- [chrism@vitaminf ~]$ cd tmp
- [chrism@vitaminf tmp]$ wget \
- http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
- [chrism@vitaminf tmp]$ tar xvzf Python-2.7.3.tgz
- [chrism@vitaminf tmp]$ cd Python-2.7.3
- [chrism@vitaminf Python-2.7.3]$ ./configure \
- --prefix=$HOME/opt/Python-2.7.3
- [chrism@vitaminf Python-2.7.3]$ make; make install
+ $ cd ~
+ $ mkdir tmp
+ $ mkdir opt
+ $ cd tmp
+ $ wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
+ $ tar xvzf Python-2.7.3.tgz
+ $ cd Python-2.7.3
+ $ ./configure --prefix=$HOME/opt/Python-2.7.3
+ $ make && make install
Once these steps are performed, the Python interpreter will be
invokable via ``$HOME/opt/Python-2.7.3/bin/python`` from a shell
@@ -205,7 +203,7 @@ Installing Distribute On Python 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``setuptools`` doesn't work under Python 3. Instead, you can use
-``distribute``, which is a fork of setuptools that does work on Python 3. To
+``distribute``, which is a fork of setuptools. To
install it, first download `distribute_setup.py
<http://python-distribute.org/distribute_setup.py>`_ then invoke it using the
Python interpreter into which you want to install setuptools.
@@ -266,16 +264,21 @@ as your system's administrative user. For example:
Creating the Virtual Python Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Once the :term:`virtualenv` package is installed in your Python, you
-can then create a virtual environment. To do so, invoke the
-following:
+Once the :term:`virtualenv` package is installed in your Python environment,
+you can then create a virtual environment. To do so, invoke the following:
.. code-block:: text
- $ virtualenv --no-site-packages env
- New python executable in env/bin/python
+ $ export VENV=~/env
+ $ virtualenv --no-site-packages $VENV
+ New python executable in /home/foo/env/bin/python
Installing setuptools.............done.
+You can either follow the use of the environment variable, ``$VENV``,
+or replace it with the root directory of the :term:`virtualenv`.
+In that case, the `export` command can be skipped.
+If you choose the former approach, ensure that it's an absolute path.
+
.. warning::
Using ``--no-site-packages`` when generating your
@@ -291,20 +294,16 @@ following:
``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.
Installing :app:`Pyramid` Into the Virtual Python Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-After you've got your ``env`` virtualenv installed, you may install
-:app:`Pyramid` itself using the following commands from within the
-virtualenv (``env``) directory you created in the last step.
+After you've got your virtualenv installed, you may install
+:app:`Pyramid` itself using the following commands:
.. code-block:: text
- $ cd env
- $ bin/easy_install pyramid
+ $ $VENV/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.
@@ -341,25 +340,25 @@ Windows Using Python 2
c:\> c:\Python27\python ez_setup.py
-#. Use that Python's `bin/easy_install` to install `virtualenv`:
+#. Install `virtualenv`:
.. code-block:: text
c:\> c:\Python27\Scripts\easy_install virtualenv
-#. Use that Python's virtualenv to make a workspace:
+#. Make a :term:`virtualenv` workspace:
.. code-block:: text
- c:\> c:\Python27\Scripts\virtualenv --no-site-packages env
-
-#. Switch to the ``env`` directory:
-
- .. code-block:: text
+ c:\> set VENV=c:\env
+ c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV%
- c:\> cd env
+ You can either follow the use of the environment variable, ``%VENV%``,
+ or replace it with the root directory of the :term:`virtualenv`.
+ In that case, the `set` command can be skipped.
+ If you choose the former approach, ensure that it's an absolute path.
-#. (Optional) Consider using ``Scripts\activate.bat`` to make your shell
+#. (Optional) Consider using ``%VENV%\Scripts\activate.bat`` to make your shell
environment wired to use the virtualenv.
#. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies
@@ -367,7 +366,7 @@ Windows Using Python 2
.. code-block:: text
- c:\env> Scripts\easy_install pyramid
+ c:\env> %VENV%\Scripts\easy_install pyramid
Windows Using Python 3
~~~~~~~~~~~~~~~~~~~~~~
@@ -390,25 +389,25 @@ Windows Using Python 3
c:\> c:\Python32\python distribute_setup.py
-#. Use that Python's `bin/easy_install` to install `virtualenv`:
+#. Install :term:`virtualenv`:
.. code-block:: text
c:\> c:\Python32\Scripts\easy_install virtualenv
-#. Use that Python's virtualenv to make a workspace:
+#. Make a :term:`virtualenv` workspace:
.. code-block:: text
- c:\> c:\Python32\Scripts\virtualenv --no-site-packages env
-
-#. Switch to the ``env`` directory:
-
- .. code-block:: text
+ c:\> set VENV=c:\env
+ c:\> c:\Python32\Scripts\virtualenv --no-site-packages %VENV%
- c:\> cd env
+ You can either follow the use of the environment variable, ``%VENV%``,
+ or replace it with the root directory of the :term:`virtualenv`.
+ In that case, the `set` command can be skipped.
+ If you choose the former approach, ensure that it's an absolute path.
-#. (Optional) Consider using ``Scripts\activate.bat`` to make your shell
+#. (Optional) Consider using ``%VENV%\Scripts\activate.bat`` to make your shell
environment wired to use the virtualenv.
#. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies
@@ -416,7 +415,7 @@ Windows Using Python 3
.. code-block:: text
- c:\env> Scripts\easy_install pyramid
+ c:\env> %VENV%\Scripts\easy_install pyramid
What Gets Installed
-------------------