From 0388722bcfee9fce6b241264ea4535a8d0d5fd8c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 11 Jul 2011 23:35:20 -0400 Subject: we no longer support 24. --- docs/narr/install.rst | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index fe8459c6f..c4ea978ec 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -9,17 +9,14 @@ Installing :app:`Pyramid` Before You Install ------------------ -You will need `Python `_ version 2.4 or better to +You will need `Python `_ version 2.5 or better to run :app:`Pyramid`. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` has been tested under Python - 2.4.6, Python 2.5.4 and Python 2.6.2, and Python 2.7. To ensure - backwards compatibility, development of :app:`Pyramid` is - currently done primarily under Python 2.4 and Python 2.5. - :app:`Pyramid` does not run under any version of Python before - 2.4, and does not yet run under Python 3.X. + As of this writing, :app:`Pyramid` has been tested under Python 2.5.5 and + Python 2.6.6, and Python 2.7.2. :app:`Pyramid` does not run under any + version of Python before 2.5, and does not yet run under Python 3.X. :app:`Pyramid` is known to run on all popular Unix-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also @@ -143,15 +140,15 @@ setuptools`` within the Python interpreter you'd like to run .. code-block:: text [chrism@vitaminf pyramid]$ python - Python 2.4.5 (#1, Aug 29 2008, 12:27:37) - [GCC 4.0.1 (Apple Inc. build 5465)] on darwin + Python 2.6.5 (r265:79063, Apr 29 2010, 00:31:32) + [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import setuptools If running ``import setuptools`` does not raise an ``ImportError``, it means that setuptools is already installed into your Python interpreter. If ``import setuptools`` fails, you will need to install -setuptools manually. Note that above we're using a Python 2.4-series +setuptools manually. Note that above we're using a Python 2.6-series interpreter on Mac OS X; your output may differ if you're using a later Python version or a different platform. -- cgit v1.2.3 From f05c3819cc8bfa1dd829a24f3c8cc82c4094a6cd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 11 Jul 2011 23:43:24 -0400 Subject: add PyPy --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c4ea978ec..837db5a94 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -20,7 +20,7 @@ run :app:`Pyramid`. :app:`Pyramid` is known to run on all popular Unix-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine and :term:`Jython`. +known to run on Google's App Engine, :term:`PyPy`, and :term:`Jython`. :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the -- cgit v1.2.3 From 01895d10b5de268089ebf4f0f4ab2812c1d0cc85 Mon Sep 17 00:00:00 2001 From: Carlos de la Guardia Date: Thu, 14 Jul 2011 11:07:39 -0700 Subject: Removed superfluous 'and' --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 837db5a94..be35d9fc2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -14,7 +14,7 @@ run :app:`Pyramid`. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` has been tested under Python 2.5.5 and + As of this writing, :app:`Pyramid` has been tested under Python 2.5.5, Python 2.6.6, and Python 2.7.2. :app:`Pyramid` does not run under any version of Python before 2.5, and does not yet run under Python 3.X. -- cgit v1.2.3 From 11027dc3d17dc687a51551dddb37da929ca2c0ba Mon Sep 17 00:00:00 2001 From: Carlos de la Guardia Date: Thu, 14 Jul 2011 11:12:39 -0700 Subject: Sentence was badly structured and also had a word capitalized after a comma --- docs/narr/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index be35d9fc2..5b9e22182 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -73,9 +73,9 @@ manager. For example, this works to do so on an Ubuntu Linux system: On Mac OS X, installing `XCode `_ has much the same effect. -Once you've got development tools installed on your system, On the -same system, to install a Python 2.6 interpreter from *source*, use -the following commands: +Once you've got development tools installed on your system, you can +install a Python 2.6 interpreter from *source*, on the same system, +using the following commands: .. code-block:: text -- cgit v1.2.3 From 6ce1e0cf1a141767ee0aca70786c15dd993347c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 20 Jul 2011 06:10:38 -0400 Subject: add more index markers --- docs/narr/install.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 5b9e22182..71988469a 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -34,6 +34,9 @@ you can either install Python using your operating system's package manager *or* you can install Python from source fairly easily on any UNIX system that has development tools. +.. index:: + pair: install; Python (from package, UNIX) + Package Manager Method ++++++++++++++++++++++ @@ -52,6 +55,9 @@ command: Once these steps are performed, the Python interpreter will usually be invokable via ``python2.6`` from a shell prompt. +.. index:: + pair: install; Python (from source, UNIX) + Source Compile Method +++++++++++++++++++++ @@ -95,6 +101,9 @@ Once these steps are performed, the Python interpreter will be invokable via ``$HOME/opt/Python-2.6.4/bin/python`` from a shell prompt. +.. index:: + pair: install; Python (from package, Windows) + If You Don't Yet Have A Python Interpreter (Windows) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -180,7 +189,7 @@ the script. To remediate this, you may need to do: $ sudo python ez_setup.py .. index:: - single: virtualenv + pair: install; virtualenv Installing the ``virtualenv`` Package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -204,6 +213,7 @@ to install it as your system's administrative user. For example: .. index:: single: virtualenv + pair: Python; virtual environment Creating the Virtual Python Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -312,6 +322,9 @@ Installing :app:`Pyramid` on Google App Engine :ref:`appengine_tutorial` documents the steps required to install a :app:`Pyramid` application on Google App Engine. +.. index:: + single: installing on Jython + Installing :app:`Pyramid` on Jython -------------------------------------- -- cgit v1.2.3 From 0bac345c6ff595302e765dfce9bd91e198d61038 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 20 Jul 2011 12:39:35 -0400 Subject: name noncpython versions we work with --- docs/narr/install.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 71988469a..f543753ce 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -20,7 +20,8 @@ run :app:`Pyramid`. :app:`Pyramid` is known to run on all popular Unix-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine, :term:`PyPy`, and :term:`Jython`. +known to run on Google's App Engine, :term:`PyPy` (1.5), and :term:`Jython` +(2.5.2). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the -- cgit v1.2.3 From d0ec94cfd0a87e5c5c705b33267039eec6f0794f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Sep 2011 14:52:18 -0400 Subject: Add Windows analogues to all command lines. Closes #144 --- docs/narr/install.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index f543753ce..a1e7ce382 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -18,10 +18,10 @@ run :app:`Pyramid`. Python 2.6.6, and Python 2.7.2. :app:`Pyramid` does not run under any version of Python before 2.5, and does not yet run under Python 3.X. -:app:`Pyramid` is known to run on all popular Unix-like systems such as +:app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine, :term:`PyPy` (1.5), and :term:`Jython` -(2.5.2). +known to run on Google's App Engine, :term:`PyPy` (1.5 and 1.6), and +:term:`Jython` (2.5.2). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the @@ -204,9 +204,9 @@ into your setuptools-enabled Python interpreter, use the $ easy_install virtualenv -This command should succeed, and tell you that the virtualenv package -is now installed. If it fails due to permission errors, you may need -to install it as your system's administrative user. For example: +This command should succeed, and tell you that the virtualenv package is now +installed. If it fails due to permission errors, you may need to install it +as your system's administrative user. For example: .. code-block:: text @@ -238,7 +238,7 @@ following: depending on the packages you've already got installed into your Python's "main" site-packages dir. -.. warning:: If you're on UNIX, *do not* use ``sudo`` to run the +.. warning:: *do not* use ``sudo`` to run the ``virtualenv`` script. It's perfectly acceptable (and desirable) to create a virtualenv as a normal user. @@ -250,7 +250,7 @@ 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: +virtualenv (``env``) directory you created in the last step. .. code-block:: text -- cgit v1.2.3 From 012b9762cd0b114b6afbf2d6356554b51706804a Mon Sep 17 00:00:00 2001 From: michr Date: Fri, 23 Sep 2011 18:48:28 -0700 Subject: fixed up all the warning dealing ..note and ..warn added a hide toc for glossary to prevent warnings --- docs/narr/install.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a1e7ce382..e1b5eb208 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -229,7 +229,9 @@ following: New python executable in env/bin/python Installing setuptools.............done. -.. warning:: Using ``--no-site-packages`` when generating your +.. warning:: + + 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 :app:`Pyramid`. If you do not specify ``--no-site-packages``, -- cgit v1.2.3 From f8869cb0664506204b22aa791003a6d5f8ded58c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 6 Oct 2011 03:22:35 -0400 Subject: remove stray references to Paste --- docs/narr/install.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e1b5eb208..66bcea706 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -347,10 +347,9 @@ Jython; use it instead. What Gets Installed ------------------- -When you ``easy_install`` :app:`Pyramid`, various Zope libraries, -various Chameleon libraries, WebOb, Paste, PasteScript, and -PasteDeploy libraries are installed. +When you ``easy_install`` :app:`Pyramid`, various other libraries such as +WebOb, PasteDeploy, and others are installed. -Additionally, as chronicled in :ref:`project_narr`, scaffolds will be registered, -which make it easy to start a new :app:`Pyramid` project. +Additionally, as chronicled in :ref:`project_narr`, scaffolds will be +registered, which make it easy to start a new :app:`Pyramid` project. -- cgit v1.2.3 From 56f1d2ea13f93b46161d12112e75125efee2120b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 21 Nov 2011 12:03:47 -0500 Subject: de-jythonify --- docs/narr/install.rst | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 66bcea706..3de4d6e27 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -9,19 +9,18 @@ Installing :app:`Pyramid` Before You Install ------------------ -You will need `Python `_ version 2.5 or better to +You will need `Python `_ version 2.6 or better to run :app:`Pyramid`. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` has been tested under Python 2.5.5, - Python 2.6.6, and Python 2.7.2. :app:`Pyramid` does not run under any - version of Python before 2.5, and does not yet run under Python 3.X. + As of this writing, :app:`Pyramid` has been tested under Python 2.6.6, + Python 2.7.2, and Python 3.2. :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 Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine, :term:`PyPy` (1.5 and 1.6), and -:term:`Jython` (2.5.2). +known to run on Google's App Engine, and :term:`PyPy` (1.6+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the @@ -325,25 +324,6 @@ Installing :app:`Pyramid` on Google App Engine :ref:`appengine_tutorial` documents the steps required to install a :app:`Pyramid` application on Google App Engine. -.. index:: - single: installing on Jython - -Installing :app:`Pyramid` on Jython --------------------------------------- - -:app:`Pyramid` is known to work under :term:`Jython` version 2.5.1. -Install :term:`Jython`, and then follow the installation steps for -:app:`Pyramid` on your platform described in one of the sections -entitled :ref:`installing_unix` or :ref:`installing_windows` above, -replacing the ``python`` command with ``jython`` as necessary. The -steps are exactly the same except you should use the ``jython`` -command name instead of the ``python`` command name. - -One caveat exists to using :app:`Pyramid` under Jython: the :term:`Chameleon` -templating engine does not work on Jython. However, the :term:`Mako` -templating system, which is also included with Pyramid, does work under -Jython; use it instead. - What Gets Installed ------------------- -- cgit v1.2.3 From 9003a8bba654f98933b98dacac67760cff73e1c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 16 Dec 2011 04:35:05 -0500 Subject: - Removed the "Running Pyramid on Google App Engine" tutorial from the main docs. It survives on in the Cookbook (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/gae.html). Rationale: it provides the correct info for the Python 2.5 version of GAE only, and this version of Pyramid does not support Python 2.5. --- docs/narr/install.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 3de4d6e27..172cfd6d3 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -20,7 +20,7 @@ run :app:`Pyramid`. :app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine, and :term:`PyPy` (1.6+). +known to run on :term:`PyPy` (1.6+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the @@ -315,15 +315,6 @@ Installing :app:`Pyramid` on a Windows System c:\env> Scripts\easy_install pyramid -.. index:: - single: installing on Google App Engine - -Installing :app:`Pyramid` on Google App Engine -------------------------------------------------- - -:ref:`appengine_tutorial` documents the steps required to install a -:app:`Pyramid` application on Google App Engine. - What Gets Installed ------------------- -- cgit v1.2.3 From eab66f3e3f5c6ddbe88c5e632d78263a5c3d7cd4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 14:36:44 -0400 Subject: update docs to recommend 2.7, add distribute-related instructions for python 3, add windows instructions for python 3, closes #653 --- docs/narr/install.rst | 213 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 156 insertions(+), 57 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 172cfd6d3..e8482a289 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -14,13 +14,13 @@ run :app:`Pyramid`. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` has been tested under Python 2.6.6, - Python 2.7.2, and Python 3.2. :app:`Pyramid` does not run under any - version of Python before 2.6. + 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 + run under any version of Python before 2.6. :app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on :term:`PyPy` (1.6+). +known to run on :term:`PyPy` (1.9+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the @@ -45,15 +45,15 @@ system's package manager is slightly different, but the "flavor" of them is usually the same. For example, on an Ubuntu Linux system, to use the system package -manager to install a Python 2.6 interpreter, use the following +manager to install a Python 2.7 interpreter, use the following command: .. code-block:: text - $ sudo apt-get install python2.6-dev + $ sudo apt-get install python2.7-dev Once these steps are performed, the Python interpreter will usually be -invokable via ``python2.6`` from a shell prompt. +invokable via ``python2.7`` from a shell prompt. .. index:: pair: install; Python (from source, UNIX) @@ -80,7 +80,7 @@ On Mac OS X, installing `XCode `_ has much the same effect. Once you've got development tools installed on your system, you can -install a Python 2.6 interpreter from *source*, on the same system, +install a Python 2.7 interpreter from *source*, on the same system, using the following commands: .. code-block:: text @@ -90,15 +90,15 @@ using the following commands: [chrism@vitaminf ~]$ mkdir opt [chrism@vitaminf ~]$ cd tmp [chrism@vitaminf tmp]$ wget \ - http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz - [chrism@vitaminf tmp]$ tar xvzf Python-2.6.4.tgz - [chrism@vitaminf tmp]$ cd Python-2.6.4 - [chrism@vitaminf Python-2.6.4]$ ./configure \ - --prefix=$HOME/opt/Python-2.6.4 - [chrism@vitaminf Python-2.6.4]$ make; make install + 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 Once these steps are performed, the Python interpreter will be -invokable via ``$HOME/opt/Python-2.6.4/bin/python`` from a shell +invokable via ``$HOME/opt/Python-2.7.3/bin/python`` from a shell prompt. .. index:: @@ -108,7 +108,7 @@ If You Don't Yet Have A Python Interpreter (Windows) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If your Windows system doesn't have a Python interpreter, you'll need -to install it by downloading a Python 2.6-series interpreter +to install it by downloading a Python 2.7-series interpreter executable from `python.org's download section `_ (the files labeled "Windows Installer"). Once you've downloaded it, double click on the @@ -119,7 +119,7 @@ extensions `_. .. warning:: After you install Python on Windows, you may need to add the - ``C:\Python26`` directory to your environment's ``Path`` in order + ``C:\Python27`` directory to your environment's ``Path`` in order to make it possible to invoke Python from a command prompt by typing ``python``. To do so, right click ``My Computer``, select ``Properties`` --> ``Advanced Tab`` --> ``Environment Variables`` @@ -141,39 +141,62 @@ done by using the :term:`virtualenv` package. Using a virtualenv will also prevent :app:`Pyramid` from globally installing versions of packages that are not compatible with your system Python. -To set up a virtualenv in which to install :app:`Pyramid`, first -ensure that :term:`setuptools` is installed. Invoke ``import -setuptools`` within the Python interpreter you'd like to run -:app:`Pyramid` under: +To set up a virtualenv in which to install :app:`Pyramid`, first ensure that +:term:`setuptools` or :term:`distribute` is installed. To do so, invoke +``import setuptools`` within the Python interpreter you'd like to run +:app:`Pyramid` under. + +Here's the output you'll expect if setuptools or distribute is already +installed: .. code-block:: text - [chrism@vitaminf pyramid]$ python - Python 2.6.5 (r265:79063, Apr 29 2010, 00:31:32) - [GCC 4.4.3] on linux2 + [chrism@thinko docs]$ python2.7 + Python 2.7.3 (default, Aug 1 2012, 05:14:39) + [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import setuptools + >>> -If running ``import setuptools`` does not raise an ``ImportError``, it -means that setuptools is already installed into your Python -interpreter. If ``import setuptools`` fails, you will need to install -setuptools manually. Note that above we're using a Python 2.6-series -interpreter on Mac OS X; your output may differ if you're using a -later Python version or a different platform. - -If you are using a "system" Python (one installed by your OS -distributor or a 3rd-party packager such as Fink or MacPorts), you can -usually install the setuptools package by using your system's package -manager. If you cannot do this, or if you're using a self-installed -version of Python, you will need to install setuptools "by hand". -Installing setuptools "by hand" is always a reasonable thing to do, -even if your package manager already has a pre-chewed version of -setuptools for installation. - -To install setuptools by hand, first download `ez_setup.py -`_ then invoke it -using the Python interpreter into which you want to install -setuptools. +Here's the output you can expect if setuptools or distribute is not already +installed: + +.. code-block:: text + + [chrism@thinko docs]$ python2.7 + Python 2.7.3 (default, Aug 1 2012, 05:14:39) + [GCC 4.6.3] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> import setutptools + Traceback (most recent call last): + File "", line 1, in + ImportError: No module named setutptools + >>> + +If ``import setuptools`` raises an :exc:`ImportError` as it does above, you +will need to install setuptools or distribute manually. Note that above +we're using a Python 2.7-series interpreter on Mac OS X; your output may +differ if you're using a later Python version or a different platform. + +If you are using a "system" Python (one installed by your OS distributor or a +3rd-party packager such as Fink or MacPorts), you can usually install the +setuptools or distribute package by using your system's package manager. If +you cannot do this, or if you're using a self-installed version of Python, +you will need to install setuptools or distribute "by hand". Installing +setuptools or distribute "by hand" is always a reasonable thing to do, even +if your package manager already has a pre-chewed version of setuptools for +installation. + +If you're using Python 2, you'll want to install ``setuptools``. If you're +using Python 3, you'll want to install ``distribute``. Below we tell you how +to do both. + +Installing Setuptools On Python 2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To install setuptools by hand under Python 2, first download `ez_setup.py +`_ then invoke it using the +Python interpreter into which you want to install setuptools. .. code-block:: text @@ -188,16 +211,37 @@ the script. To remediate this, you may need to do: $ sudo python ez_setup.py +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 +install it, first download `distribute_setup.py +`_ then invoke it using the +Python interpreter into which you want to install setuptools. + +.. code-block:: text + + $ python3 distribute_setup.py + +Once this command is invoked, distribute should be installed on your system. +If the command fails due to permission errors, you may need to be the +administrative user on your system to successfully invoke the script. To +remediate this, you may need to do: + +.. code-block:: text + + $ sudo python3 distribute_setup.py + .. index:: pair: install; virtualenv Installing the ``virtualenv`` Package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once you've got setuptools installed, you should install the -:term:`virtualenv` package. To install the :term:`virtualenv` package -into your setuptools-enabled Python interpreter, use the -``easy_install`` command. +Once you've got setuptools or distribute installed, you should install the +:term:`virtualenv` package. To install the :term:`virtualenv` package into +your setuptools-enabled Python interpreter, use the ``easy_install`` command. .. code-block:: text @@ -269,35 +313,90 @@ complete, as it downloads and installs a number of dependencies. Installing :app:`Pyramid` on a Windows System ------------------------------------------------- -#. Install, or find `Python 2.6 - `_ for your system. +You can use Pyramid on Windows under Python 2 or under Python 3. Directions +for both versions are included below. + +Windows Using Python 2 +~~~~~~~~~~~~~~~~~~~~~~ + +#. Install, or find `Python 2.7 + `_ for your system. #. Install the `Python for Windows extensions `_. Make sure to - pick the right download for Python 2.6 and install it using the + pick the right download for Python 2.7 and install it using the same Python installation from the previous step. #. Install latest :term:`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 + the ``python`` interpreter of your Python 2.7 installation using a command prompt: .. code-block:: text - c:\> c:\Python26\python ez_setup.py + c:\> c:\Python27\python ez_setup.py + +#. Use that Python's `bin/easy_install` to install `virtualenv`: + + .. code-block:: text + + c:\> c:\Python27\Scripts\easy_install virtualenv + +#. Use that Python's virtualenv to make a workspace: + + .. code-block:: text + + c:\> c:\Python27\Scripts\virtualenv --no-site-packages env + +#. Switch to the ``env`` directory: + + .. code-block:: text + + c:\> cd env + +#. (Optional) Consider using ``Scripts\activate.bat`` to make your shell + environment wired to use the virtualenv. + +#. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies + installed: + + .. code-block:: text + + c:\env> Scripts\easy_install pyramid + +Windows Using Python 3 +~~~~~~~~~~~~~~~~~~~~~~ + +#. Install, or find `Python 3.2 + `_ for your system. + +#. Install the `Python for Windows extensions + `_. Make sure to + pick the right download for Python 3.2 and install it using the + same Python installation from the previous step. + +#. Install latest :term:`distribute` distribution into the Python you + obtained/installed/found in the step above: download `distribute_setup.py + `_ and run it using the + ``python`` interpreter of your Python 3.2 installation using a command + prompt: + + .. code-block:: text + + c:\> c:\Python32\python distribute_setup.py #. Use that Python's `bin/easy_install` to install `virtualenv`: .. code-block:: text - c:\> c:\Python26\Scripts\easy_install virtualenv + c:\> c:\Python32\Scripts\easy_install virtualenv #. Use that Python's virtualenv to make a workspace: .. code-block:: text - c:\> c:\Python26\Scripts\virtualenv --no-site-packages env + c:\> c:\Python32\Scripts\virtualenv --no-site-packages env #. Switch to the ``env`` directory: @@ -308,8 +407,8 @@ Installing :app:`Pyramid` on a Windows System #. (Optional) Consider using ``Scripts\activate.bat`` to make your shell environment wired to use the virtualenv. -#. Use ``easy_install`` pointed at the "current" index to get - :app:`Pyramid` and its direct dependencies installed: +#. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies + installed: .. code-block:: text -- cgit v1.2.3 From 5acf4b4809e88dfeb3882f5033622a9517763d02 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 22 Nov 2012 00:39:19 -0500 Subject: appeasement --- docs/narr/install.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e8482a289..32f331550 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -243,6 +243,17 @@ Once you've got setuptools or distribute installed, you should install the :term:`virtualenv` package. To install the :term:`virtualenv` package into your setuptools-enabled Python interpreter, use the ``easy_install`` command. +.. warning:: + + Even though Python 3.3 and better comes with ``pyvenv`` out of the box, + which is similar to ``virtualenv``, we suggest using ``virtualenv`` instead. + ``virtualenv`` works on well Python 3.3. This isn't a recommendation made + for technical reasons, it's one made because it's not possible for the + authors of this guide to explain setup using multiple virtual environment + systems. ``pyenv`` will work fine. However, if you use ``pyvenv`` instead, + you'll need to understand how to install software such as ``distribute`` + into the virtual environment manually, which this guide does not cover. + .. code-block:: text $ easy_install virtualenv -- cgit v1.2.3 From 5d9c28f4e7f1fd3eba75e5bb51aebcbb56440df8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 22 Nov 2012 00:40:47 -0500 Subject: more appeasement --- docs/narr/install.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 32f331550..663f0df6c 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -248,11 +248,14 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. Even though Python 3.3 and better comes with ``pyvenv`` out of the box, which is similar to ``virtualenv``, we suggest using ``virtualenv`` instead. ``virtualenv`` works on well Python 3.3. This isn't a recommendation made - for technical reasons, it's one made because it's not possible for the + for technical reasons, it's one made because it's not feasible for the authors of this guide to explain setup using multiple virtual environment - systems. ``pyenv`` will work fine. However, if you use ``pyvenv`` instead, - you'll need to understand how to install software such as ``distribute`` - into the virtual environment manually, which this guide does not cover. + systems. We are aiming to not need to make the installation documentation + Turing-complete. + + ``pyenv`` will work fine. However, if you use ``pyvenv`` instead, you'll + need to understand how to install software such as ``distribute`` into the + virtual environment manually, which this guide does not cover. .. code-block:: text -- cgit v1.2.3 From fb30e2cb79490f9dcafaea3d5ce2c0af140eae71 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 22 Nov 2012 13:28:41 -0500 Subject: typos --- docs/narr/install.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 663f0df6c..882e76f11 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -253,9 +253,10 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. systems. We are aiming to not need to make the installation documentation Turing-complete. - ``pyenv`` will work fine. However, if you use ``pyvenv`` instead, you'll - need to understand how to install software such as ``distribute`` into the - virtual environment manually, which this guide does not cover. + ``pyvenv`` will work fine. However, if you use ``pyvenv`` instead of + ``virtualenv``, you'll need to understand how to install software such as + ``distribute`` into the virtual environment manually, which this guide does + not cover. .. code-block:: text -- cgit v1.2.3 From b27d66f81274625446c301c2675638b36b5e16b3 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 1 Jan 2013 20:12:47 +0200 Subject: fix #746: explain why a dev package is installed --- docs/narr/install.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 882e76f11..c9cdb745a 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -52,6 +52,10 @@ command: $ sudo apt-get install python2.7-dev +This command will install both the Python interpreter and its header files. +Note that these headers are required by some dependencies you will use +in this docomentation, not by Pyramid itself. + Once these steps are performed, the Python interpreter will usually be invokable via ``python2.7`` from a shell prompt. -- cgit v1.2.3 From 78bacaa69f63fe2bc6980d7d40fc0523d5af9199 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 1 Jan 2013 21:52:33 +0200 Subject: typos --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 882e76f11..09c37c7f2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -167,10 +167,10 @@ installed: Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. - >>> import setutptools + >>> import setuptools Traceback (most recent call last): File "", line 1, in - ImportError: No module named setutptools + ImportError: No module named setuptools >>> If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -- cgit v1.2.3 From 78bba61a7a53949529c1b7444fd6611e116b725d Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 1 Jan 2013 23:34:09 +0200 Subject: improve wording regarding pyvenv --- docs/narr/install.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 882e76f11..8a8513348 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -245,18 +245,19 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. .. warning:: - Even though Python 3.3 and better comes with ``pyvenv`` out of the box, - which is similar to ``virtualenv``, we suggest using ``virtualenv`` instead. - ``virtualenv`` works on well Python 3.3. This isn't a recommendation made - for technical reasons, it's one made because it's not feasible for the + Python 3.3 includes ``pyvenv`` out of the box, which provides similar + functionality to ``virtualenv``. + We however suggest using ``virtualenv`` instead, + which works well with Python 3.3. + This isn't a recommendation made for technical reasons; + it's made because it's not feasible for the authors of this guide to explain setup using multiple virtual environment systems. We are aiming to not need to make the installation documentation Turing-complete. - ``pyvenv`` will work fine. However, if you use ``pyvenv`` instead of - ``virtualenv``, you'll need to understand how to install software such as - ``distribute`` into the virtual environment manually, which this guide does - not cover. + If you insist on using ``pyvenv``, you'll need to understand how to install + software such as``distribute`` into the virtual environment manually, + which this guide does not cover. .. code-block:: text -- cgit v1.2.3 From 638ce950df1c8c8393c44a578270480f86dd060c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 1 Jan 2013 21:11:38 -0500 Subject: fix rationale and typo --- docs/narr/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c9cdb745a..a1c7b0d64 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -52,9 +52,9 @@ command: $ sudo apt-get install python2.7-dev -This command will install both the Python interpreter and its header files. -Note that these headers are required by some dependencies you will use -in this docomentation, not by Pyramid itself. +This command will install both the Python interpreter and its development +header files. Note that the headers are required by some (optional) C +extensions in software depended upon by Pyramid, not by Pyramid itself. Once these steps are performed, the Python interpreter will usually be invokable via ``python2.7`` from a shell prompt. -- cgit v1.2.3 From 00d83a42a4499a1a94d9019b740cc477270960cf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 1 Jan 2013 21:23:12 -0500 Subject: reflow, typo --- docs/narr/install.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 8947a891f..6db0d88f5 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -250,17 +250,15 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. .. warning:: Python 3.3 includes ``pyvenv`` out of the box, which provides similar - functionality to ``virtualenv``. - We however suggest using ``virtualenv`` instead, - which works well with Python 3.3. - This isn't a recommendation made for technical reasons; - it's made because it's not feasible for the - authors of this guide to explain setup using multiple virtual environment - systems. We are aiming to not need to make the installation documentation + functionality to ``virtualenv``. We however suggest using ``virtualenv`` + instead, which works well with Python 3.3. This isn't a recommendation made + for technical reasons; it's made because it's not feasible for the authors + of this guide to explain setup using multiple virtual environment systems. + We are aiming to not need to make the installation documentation Turing-complete. If you insist on using ``pyvenv``, you'll need to understand how to install - software such as``distribute`` into the virtual environment manually, + software such as ``distribute`` into the virtual environment manually, which this guide does not cover. .. code-block:: text -- cgit v1.2.3 From 22ed77d69b0f2348983be0c4e8758a44cf160671 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 9 Jan 2013 02:30:47 +0200 Subject: take advantage of the -c option of Python --- docs/narr/install.rst | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index ff89553ae..a78c1b2bd 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -150,32 +150,21 @@ To set up a virtualenv in which to install :app:`Pyramid`, first ensure that ``import setuptools`` within the Python interpreter you'd like to run :app:`Pyramid` under. -Here's the output you'll expect if setuptools or distribute is already -installed: +The following command will not display anything if setuptools or distribute is +already installed: .. code-block:: text - [chrism@thinko docs]$ python2.7 - Python 2.7.3 (default, Aug 1 2012, 05:14:39) - [GCC 4.6.3] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> import setuptools - >>> + $ python2.7 -c 'import setuptools' -Here's the output you can expect if setuptools or distribute is not already -installed: +Running the same command will yield the following output if setuptools or +distribute is not yet installed: .. code-block:: text - [chrism@thinko docs]$ python2.7 - Python 2.7.3 (default, Aug 1 2012, 05:14:39) - [GCC 4.6.3] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> import setuptools Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools - >>> If ``import setuptools`` raises an :exc:`ImportError` as it does above, you will need to install setuptools or distribute manually. Note that above -- cgit v1.2.3 From 7e10cd0fd38bdeeba988e6ecf1b6179a0086559c Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 17 Jan 2013 22:06:50 +0200 Subject: miscellaneous doc improvements * the word "system" can be misleading, so use a clearer choice of words * reduce repetition * mention Debian, since it is similar to Ubuntu, and is major enough * it is now "Ubuntu", not "Ubuntu Linux" --- docs/narr/install.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a78c1b2bd..6653243d5 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -40,13 +40,11 @@ UNIX system that has development tools. Package Manager Method ++++++++++++++++++++++ -You can use your system's "package manager" to install Python. Every -system's package manager is slightly different, but the "flavor" of +You can use your system's "package manager" to install Python. +Each package manager is slightly different, but the "flavor" of them is usually the same. -For example, on an Ubuntu Linux system, to use the system package -manager to install a Python 2.7 interpreter, use the following -command: +For example, on a Debian or Ubuntu system, use the following command: .. code-block:: text -- cgit v1.2.3 From b31e5c9c46f4d87177b114f50328a8b0b39908be Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 17 Jan 2013 22:30:25 +0200 Subject: fix #747 --- docs/narr/install.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a78c1b2bd..19c144156 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -70,7 +70,8 @@ Python interpreter to develop your software. The authors of :app:`Pyramid` tend not to use the system Python for development purposes; always a self-compiled one. Compiling Python is usually easy, and often the "system" Python is compiled with options that -aren't optimal for web development. +aren't optimal for web development. For an explanation, see +https://github.com/Pylons/pyramid/issues/747. To compile software on your UNIX system, typically you need development tools. Often these can be installed via the package -- cgit v1.2.3 From 6821582d7e691b8c068ce80ec067319c65195716 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 30 Jan 2013 01:18:06 +0200 Subject: this obsolete info should have been removed in commit 22ed77d --- docs/narr/install.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 224a62db7..c467779f4 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -166,9 +166,7 @@ distribute is not yet installed: ImportError: No module named setuptools If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -will need to install setuptools or distribute manually. Note that above -we're using a Python 2.7-series interpreter on Mac OS X; your output may -differ if you're using a later Python version or a different platform. +will need to install setuptools or distribute manually. If you are using a "system" Python (one installed by your OS distributor or a 3rd-party packager such as Fink or MacPorts), you can usually install the -- cgit v1.2.3 From bd070e77f4183a34507fe6f19604751cb78e3e8c Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Mon, 4 Feb 2013 21:15:08 +0200 Subject: unuglify Unix Python installation instructions --- docs/narr/install.rst | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c467779f4..e18716baa 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -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 -- cgit v1.2.3 From 148c7da017ef775932b2a4baeb0bd3057976adcc Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Mon, 4 Feb 2013 21:27:03 +0200 Subject: no need to be so specific This should reduce the frequency of needing to update it. --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c467779f4..91e1cae6f 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 -- cgit v1.2.3 From 1bdfad6c7303a810b05c60c53443dacc4d111852 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 9 Feb 2013 00:47:47 +0200 Subject: remove obvious, and therefore redundant, info --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index b092f73bc..85dfd5bf4 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -203,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 `_ then invoke it using the Python interpreter into which you want to install setuptools. -- cgit v1.2.3 From f73f0e332658fac2583f51247dcd49bd36d63ce4 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 13 Mar 2013 23:05:17 +0200 Subject: consistency: use $VENV whenever virtualenv binaries are used --- docs/narr/install.rst | 65 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 85dfd5bf4..6656882c9 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -264,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 @@ -289,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. @@ -339,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 @@ -365,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 ~~~~~~~~~~~~~~~~~~~~~~ @@ -388,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 @@ -414,7 +415,7 @@ Windows Using Python 3 .. code-block:: text - c:\env> Scripts\easy_install pyramid + c:\env> %VEN%\Scripts\easy_install pyramid What Gets Installed ------------------- -- cgit v1.2.3 From 919643eec1a480cee442331a966a9c6c90fb0965 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 13 Mar 2013 23:36:18 +0200 Subject: typo --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 6656882c9..04a060ac3 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -415,7 +415,7 @@ Windows Using Python 3 .. code-block:: text - c:\env> %VEN%\Scripts\easy_install pyramid + c:\env> %VENV%\Scripts\easy_install pyramid What Gets Installed ------------------- -- cgit v1.2.3 From ed214d879cab4f00f5151011279c69ea07da6540 Mon Sep 17 00:00:00 2001 From: Steven Citron-Pousty Date: Tue, 19 Mar 2013 13:00:29 -0700 Subject: fixed the syntax for exporting the VENV --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 04a060ac3..9bc62dc62 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -269,7 +269,7 @@ you can then create a virtual environment. To do so, invoke the following: .. code-block:: text - $ export $VENV=~/env + $ export VENV=~/env $ virtualenv --no-site-packages $VENV New python executable in /home/foo/env/bin/python Installing setuptools.............done. -- cgit v1.2.3 From 7c47008ad76199dd5a638bc8c3a912664bd9c7d6 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 20 Mar 2013 14:36:06 -0700 Subject: Add special section for Mac OS X users. --- docs/narr/install.rst | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 9bc62dc62..0a03d9170 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -19,13 +19,32 @@ run :app:`Pyramid`. run under any version of Python before 2.6. :app:`Pyramid` is known to run on all popular UNIX-like systems such as -Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on :term:`PyPy` (1.9+). +Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is +also known to run on :term:`PyPy` (1.9+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the requirements mentioned. +For Mac OS X Users +~~~~~~~~~~~~~~~~~~ + +From `Python.org `_: + + Python comes pre-installed on Mac OS X, but due to Apple's release + cycle, it's often one or even two years old. The overwhelming + recommendation of the "MacPython" community is to upgrade your + Python by downloading and installing a newer version from + `the Python standard release page `_. + +It is recommended to download one of the *installer* versions, unless you prefer to install your Python through a packgage manager (e.g., macports or homebrew) or to build your Python from source. + +Unless you have a need for a specific earlier version, it is recommended +to install the latest 2.x or 3.x version of Python. + +If you use an installer for your Python, then you can skip to the +section :ref:`installing_unix`. + If You Don't Yet Have A Python Interpreter (UNIX) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 21d0288a9211b175f61769d7e7cf471f12ee09cb Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 21 Mar 2013 14:03:03 -0700 Subject: Generalize Python versions in Windows section. --- docs/narr/install.rst | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 0a03d9170..7f4742ee2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -341,8 +341,8 @@ for both versions are included below. Windows Using Python 2 ~~~~~~~~~~~~~~~~~~~~~~ -#. Install, or find `Python 2.7 - `_ for your system. +#. Install, or find the most recent `Python 2.7.x version + `_ for your system. #. Install the `Python for Windows extensions `_. Make sure to @@ -390,36 +390,47 @@ Windows Using Python 2 Windows Using Python 3 ~~~~~~~~~~~~~~~~~~~~~~ -#. Install, or find `Python 3.2 - `_ for your system. +#. Install, or find the latest version of `Python 3.x + `_ for your system and which is + supported by Pyramid. #. Install the `Python for Windows extensions `_. Make sure to - pick the right download for Python 3.2 and install it using the + pick the right download for Python 3.x and install it using the same Python installation from the previous step. #. Install latest :term:`distribute` distribution into the Python you obtained/installed/found in the step above: download `distribute_setup.py `_ and run it using the - ``python`` interpreter of your Python 3.2 installation using a command + ``python`` interpreter of your Python 3.x installation using a command prompt: .. code-block:: text + # modify the command according to the python version, e.g.: + # for Python 3.2.x: c:\> c:\Python32\python distribute_setup.py + # for Python 3.3.x: + c:\> c:\Python33\python distribute_setup.py #. Install :term:`virtualenv`: .. code-block:: text + # for Python 3.2.x: c:\> c:\Python32\Scripts\easy_install virtualenv + # for Python 3.3.x: + c:\> c:\Python33\Scripts\easy_install virtualenv #. Make a :term:`virtualenv` workspace: .. code-block:: text c:\> set VENV=c:\env + # for Python 3.2.x: c:\> c:\Python32\Scripts\virtualenv --no-site-packages %VENV% + # for Python 3.3.x: + c:\> c:\Python33\Scripts\virtualenv --no-site-packages %VENV% You can either follow the use of the environment variable, ``%VENV%``, or replace it with the root directory of the :term:`virtualenv`. -- cgit v1.2.3 From 9c69d9a0de8c2a34820be05f36e32f68b29e5276 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 23 Mar 2013 03:30:41 -0700 Subject: remove 'or find' --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 7f4742ee2..8fc63f3a4 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -341,7 +341,7 @@ for both versions are included below. Windows Using Python 2 ~~~~~~~~~~~~~~~~~~~~~~ -#. Install, or find the most recent `Python 2.7.x version +#. Install the most recent `Python 2.7.x version `_ for your system. #. Install the `Python for Windows extensions -- cgit v1.2.3 From 5710a15399fcbf7d682171087393418473fdea6a Mon Sep 17 00:00:00 2001 From: kusut Date: Thu, 15 Aug 2013 20:26:58 +0700 Subject: Update install.rst - simplify installation by removing distribute (merge with setuptools) - update setuptools link - simplify windows tutorial by dropping 3.2, latest python version only (2.7 and 3.3) --- docs/narr/install.rst | 144 ++++++++++++-------------------------------------- 1 file changed, 33 insertions(+), 111 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 8fc63f3a4..d05c8abeb 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -162,19 +162,19 @@ also prevent :app:`Pyramid` from globally installing versions of packages that are not compatible with your system Python. To set up a virtualenv in which to install :app:`Pyramid`, first ensure that -:term:`setuptools` or :term:`distribute` is installed. To do so, invoke +:term:`setuptools` is installed. To do so, invoke ``import setuptools`` within the Python interpreter you'd like to run :app:`Pyramid` under. -The following command will not display anything if setuptools or distribute is +The following command will not display anything if setuptools is already installed: .. code-block:: text $ python2.7 -c 'import setuptools' -Running the same command will yield the following output if setuptools or -distribute is not yet installed: +Running the same command will yield the following output if setuptools is not +yet installed: .. code-block:: text @@ -183,27 +183,23 @@ distribute is not yet installed: ImportError: No module named setuptools If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -will need to install setuptools or distribute manually. +will need to install setuptools manually. If you are using a "system" Python (one installed by your OS distributor or a 3rd-party packager such as Fink or MacPorts), you can usually install the -setuptools or distribute package by using your system's package manager. If +setuptools package by using your system's package manager. If you cannot do this, or if you're using a self-installed version of Python, -you will need to install setuptools or distribute "by hand". Installing -setuptools or distribute "by hand" is always a reasonable thing to do, even +you will need to install setuptools "by hand". Installing +setuptools "by hand" is always a reasonable thing to do, even if your package manager already has a pre-chewed version of setuptools for installation. -If you're using Python 2, you'll want to install ``setuptools``. If you're -using Python 3, you'll want to install ``distribute``. Below we tell you how -to do both. - -Installing Setuptools On Python 2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Installing Setuptools +~~~~~~~~~~~~~~~~~~~~~ To install setuptools by hand under Python 2, first download `ez_setup.py -`_ then invoke it using the -Python interpreter into which you want to install setuptools. +`_ then +invoke it using the Python interpreter into which you want to install setuptools. .. code-block:: text @@ -218,35 +214,13 @@ the script. To remediate this, you may need to do: $ sudo python ez_setup.py -Installing Distribute On Python 3 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``setuptools`` doesn't work under Python 3. Instead, you can use -``distribute``, which is a fork of setuptools. To -install it, first download `distribute_setup.py -`_ then invoke it using the -Python interpreter into which you want to install setuptools. - -.. code-block:: text - - $ python3 distribute_setup.py - -Once this command is invoked, distribute should be installed on your system. -If the command fails due to permission errors, you may need to be the -administrative user on your system to successfully invoke the script. To -remediate this, you may need to do: - -.. code-block:: text - - $ sudo python3 distribute_setup.py - .. index:: pair: install; virtualenv Installing the ``virtualenv`` Package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once you've got setuptools or distribute installed, you should install the +Once you've got setuptools installed, you should install the :term:`virtualenv` package. To install the :term:`virtualenv` package into your setuptools-enabled Python interpreter, use the ``easy_install`` command. @@ -261,7 +235,7 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. Turing-complete. If you insist on using ``pyvenv``, you'll need to understand how to install - software such as ``distribute`` into the virtual environment manually, + software such as ``setuptools`` into the virtual environment manually, which this guide does not cover. .. code-block:: text @@ -335,91 +309,37 @@ complete, as it downloads and installs a number of dependencies. Installing :app:`Pyramid` on a Windows System ------------------------------------------------- -You can use Pyramid on Windows under Python 2 or under Python 3. Directions -for both versions are included below. +You can use Pyramid on Windows under Python 2 or under Python 3. -Windows Using Python 2 -~~~~~~~~~~~~~~~~~~~~~~ - -#. Install the most recent `Python 2.7.x version +#. Install the most recent `Python 2.7.x or 3.3.x version `_ for your system. #. Install the `Python for Windows extensions `_. Make sure to - pick the right download for Python 2.7 and install it using the - same Python installation from the previous step. + pick the right download for Python 2.7 or Python 3.3 and install it + using the same Python installation from the previous step. #. Install latest :term:`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.7 installation using a - command prompt: + `_ + and run it using the ``python`` interpreter of your Python 2.7 or 3.3 + installation using a command prompt: .. code-block:: text + # modify the command according to the python version, e.g.: + # for Python 2.7: c:\> c:\Python27\python ez_setup.py + # for Python 3.3: + c:\> c:\Python33\python ez_setup.py #. Install `virtualenv`: .. code-block:: text - - c:\> c:\Python27\Scripts\easy_install virtualenv - -#. Make a :term:`virtualenv` workspace: - - .. code-block:: text - - c:\> set VENV=c:\env - c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% - - 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 ``%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 - installed: - - .. code-block:: text - - c:\env> %VENV%\Scripts\easy_install pyramid - -Windows Using Python 3 -~~~~~~~~~~~~~~~~~~~~~~ - -#. Install, or find the latest version of `Python 3.x - `_ for your system and which is - supported by Pyramid. - -#. Install the `Python for Windows extensions - `_. Make sure to - pick the right download for Python 3.x and install it using the - same Python installation from the previous step. - -#. Install latest :term:`distribute` distribution into the Python you - obtained/installed/found in the step above: download `distribute_setup.py - `_ and run it using the - ``python`` interpreter of your Python 3.x installation using a command - prompt: - - .. code-block:: text - # modify the command according to the python version, e.g.: - # for Python 3.2.x: - c:\> c:\Python32\python distribute_setup.py - # for Python 3.3.x: - c:\> c:\Python33\python distribute_setup.py - -#. Install :term:`virtualenv`: - - .. code-block:: text - - # for Python 3.2.x: - c:\> c:\Python32\Scripts\easy_install virtualenv - # for Python 3.3.x: + # for Python 2.7: + c:\> c:\Python27\Scripts\easy_install virtualenv + # for Python 3.3: c:\> c:\Python33\Scripts\easy_install virtualenv #. Make a :term:`virtualenv` workspace: @@ -427,9 +347,11 @@ Windows Using Python 3 .. code-block:: text c:\> set VENV=c:\env - # for Python 3.2.x: - c:\> c:\Python32\Scripts\virtualenv --no-site-packages %VENV% - # for Python 3.3.x: + + # modify the command according to the python version, e.g.: + # for Python 2.7: + c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% + # for Python 3.3: c:\> c:\Python33\Scripts\virtualenv --no-site-packages %VENV% You can either follow the use of the environment variable, ``%VENV%``, -- cgit v1.2.3 From 58c5fefd37109fe7f27ca77a3d0896cc4b8e0470 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 15 Aug 2013 21:57:48 +0200 Subject: fix some rST issues --- docs/narr/install.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index d05c8abeb..ef5772f79 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -336,6 +336,7 @@ You can use Pyramid on Windows under Python 2 or under Python 3. #. Install `virtualenv`: .. code-block:: text + # modify the command according to the python version, e.g.: # for Python 2.7: c:\> c:\Python27\Scripts\easy_install virtualenv -- cgit v1.2.3 From d04e2c8e7d12768f92f18ab4771b76492927bb6d Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 15 Aug 2013 02:44:39 -0700 Subject: Clean up directions for install Python 2 and 3 and Python extensions on Windows, per feedback from Windows guinea pigs at SFPython Hack Night. --- docs/narr/install.rst | 149 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 114 insertions(+), 35 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index ef5772f79..c1ce64406 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -162,19 +162,19 @@ also prevent :app:`Pyramid` from globally installing versions of packages that are not compatible with your system Python. To set up a virtualenv in which to install :app:`Pyramid`, first ensure that -:term:`setuptools` is installed. To do so, invoke +:term:`setuptools` or :term:`distribute` is installed. To do so, invoke ``import setuptools`` within the Python interpreter you'd like to run :app:`Pyramid` under. -The following command will not display anything if setuptools is +The following command will not display anything if setuptools or distribute is already installed: .. code-block:: text $ python2.7 -c 'import setuptools' -Running the same command will yield the following output if setuptools is not -yet installed: +Running the same command will yield the following output if setuptools or +distribute is not yet installed: .. code-block:: text @@ -183,23 +183,27 @@ yet installed: ImportError: No module named setuptools If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -will need to install setuptools manually. +will need to install setuptools or distribute manually. If you are using a "system" Python (one installed by your OS distributor or a 3rd-party packager such as Fink or MacPorts), you can usually install the -setuptools package by using your system's package manager. If +setuptools or distribute package by using your system's package manager. If you cannot do this, or if you're using a self-installed version of Python, -you will need to install setuptools "by hand". Installing -setuptools "by hand" is always a reasonable thing to do, even +you will need to install setuptools or distribute "by hand". Installing +setuptools or distribute "by hand" is always a reasonable thing to do, even if your package manager already has a pre-chewed version of setuptools for installation. -Installing Setuptools -~~~~~~~~~~~~~~~~~~~~~ +If you're using Python 2, you'll want to install ``setuptools``. If you're +using Python 3, you'll want to install ``distribute``. Below we tell you how +to do both. + +Installing Setuptools On Python 2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To install setuptools by hand under Python 2, first download `ez_setup.py -`_ then -invoke it using the Python interpreter into which you want to install setuptools. +`_ then invoke it using the +Python interpreter into which you want to install setuptools. .. code-block:: text @@ -214,13 +218,35 @@ the script. To remediate this, you may need to do: $ sudo python ez_setup.py +Installing Distribute On Python 3 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``setuptools`` doesn't work under Python 3. Instead, you can use +``distribute``, which is a fork of setuptools. To +install it, first download `distribute_setup.py +`_ then invoke it using the +Python interpreter into which you want to install setuptools. + +.. code-block:: text + + $ python3 distribute_setup.py + +Once this command is invoked, distribute should be installed on your system. +If the command fails due to permission errors, you may need to be the +administrative user on your system to successfully invoke the script. To +remediate this, you may need to do: + +.. code-block:: text + + $ sudo python3 distribute_setup.py + .. index:: pair: install; virtualenv Installing the ``virtualenv`` Package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once you've got setuptools installed, you should install the +Once you've got setuptools or distribute installed, you should install the :term:`virtualenv` package. To install the :term:`virtualenv` package into your setuptools-enabled Python interpreter, use the ``easy_install`` command. @@ -235,7 +261,7 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. Turing-complete. If you insist on using ``pyvenv``, you'll need to understand how to install - software such as ``setuptools`` into the virtual environment manually, + software such as ``distribute`` into the virtual environment manually, which this guide does not cover. .. code-block:: text @@ -309,50 +335,103 @@ complete, as it downloads and installs a number of dependencies. Installing :app:`Pyramid` on a Windows System ------------------------------------------------- -You can use Pyramid on Windows under Python 2 or under Python 3. +You can use Pyramid on Windows under Python 2 or under Python 3. Directions +for both versions are included below. -#. Install the most recent `Python 2.7.x or 3.3.x version +Windows Using Python 2 +~~~~~~~~~~~~~~~~~~~~~~ + +#. Download and install the most recent `Python 2.7.x version `_ for your system. -#. Install the `Python for Windows extensions - `_. Make sure to - pick the right download for Python 2.7 or Python 3.3 and install it - using the same Python installation from the previous step. +#. Download and install the `Python for Windows extensions + `_. Carefully read + the README.txt file at the end of the list of builds, and follow its + directions. Make sure you get the proper bittedness of build and Python + 2.7 version. #. Install latest :term:`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.7 or 3.3 - installation using a command prompt: + `_ and run it using + the ``python`` interpreter of your Python 2.7 installation using a + command prompt: .. code-block:: text - # modify the command according to the python version, e.g.: - # for Python 2.7: c:\> c:\Python27\python ez_setup.py - # for Python 3.3: - c:\> c:\Python33\python ez_setup.py #. Install `virtualenv`: .. code-block:: text - # modify the command according to the python version, e.g.: - # for Python 2.7: c:\> c:\Python27\Scripts\easy_install virtualenv - # for Python 3.3: - c:\> c:\Python33\Scripts\easy_install virtualenv #. Make a :term:`virtualenv` workspace: .. code-block:: text c:\> set VENV=c:\env - - # modify the command according to the python version, e.g.: - # for Python 2.7: c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% - # for Python 3.3: + + 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 ``%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 + installed: + + .. code-block:: text + + c:\env> %VENV%\Scripts\easy_install pyramid + +Windows Using Python 3 +~~~~~~~~~~~~~~~~~~~~~~ + +#. Download and install the latest version of `Python 3.x + `_ for your system and which is + supported by Pyramid. + +#. Download and install the `Python for Windows extensions + `_. Carefully read + the README.txt file at the end of the list of builds, and follow its + directions. Make sure you get the proper bittedness of build and Python + 3.x version. + +#. Install latest :term:`distribute` distribution into the Python you + obtained/installed/found in the step above: download `distribute_setup.py + `_ and run it using the + ``python`` interpreter of your Python 3.x installation using a command + prompt: + + .. code-block:: text + + # modify the command according to the python version, e.g.: + # for Python 3.2.x: + c:\> c:\Python32\python distribute_setup.py + # for Python 3.3.x: + c:\> c:\Python33\python distribute_setup.py + +#. Install :term:`virtualenv`: + + .. code-block:: text + + # for Python 3.2.x: + c:\> c:\Python32\Scripts\easy_install virtualenv + # for Python 3.3.x: + c:\> c:\Python33\Scripts\easy_install virtualenv + +#. Make a :term:`virtualenv` workspace: + + .. code-block:: text + + c:\> set VENV=c:\env + # for Python 3.2.x: + c:\> c:\Python32\Scripts\virtualenv --no-site-packages %VENV% + # for Python 3.3.x: c:\> c:\Python33\Scripts\virtualenv --no-site-packages %VENV% You can either follow the use of the environment variable, ``%VENV%``, -- cgit v1.2.3 From b35dc8716d2281e9ee7856736d19a45000802c81 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 15 Aug 2013 04:45:21 -0700 Subject: Sphinx: WAAAAAAH! Just shut up and duplicate the link already. --- docs/narr/install.rst | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c1ce64406..eaa9642a8 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -344,11 +344,8 @@ Windows Using Python 2 #. Download and install the most recent `Python 2.7.x version `_ for your system. -#. Download and install the `Python for Windows extensions - `_. Carefully read - the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper bittedness of build and Python - 2.7 version. +#. Download and install the `Python for Windows extensions (for Python 2.7) `_. + Carefully read the README.txt file at the end of the list of builds, and follow its directions. Make sure you get the proper bittedness of build and Python 2.7 version. #. Install latest :term:`setuptools` distribution into the Python you obtained/installed/found in the step above: download `ez_setup.py @@ -395,11 +392,8 @@ Windows Using Python 3 `_ for your system and which is supported by Pyramid. -#. Download and install the `Python for Windows extensions - `_. Carefully read - the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper bittedness of build and Python - 3.x version. +#. Download and install the `Python for Windows extensions (for Python 3.x) `_. + Carefully read the README.txt file at the end of the list of builds, and follow its directions. Make sure you get the proper bittedness of build and Python 3.x version. #. Install latest :term:`distribute` distribution into the Python you obtained/installed/found in the step above: download `distribute_setup.py -- cgit v1.2.3 From 96645b9b7efb55976d5a87fc3d27982b572e031a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 15 Aug 2013 04:49:08 -0700 Subject: and fix 79 cols --- docs/narr/install.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index eaa9642a8..54109e70f 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -344,8 +344,11 @@ Windows Using Python 2 #. Download and install the most recent `Python 2.7.x version `_ for your system. -#. Download and install the `Python for Windows extensions (for Python 2.7) `_. - Carefully read the README.txt file at the end of the list of builds, and follow its directions. Make sure you get the proper bittedness of build and Python 2.7 version. +#. Download and install the `Python for Windows extensions (for Python 2.7) + `_. Carefully read + the README.txt file at the end of the list of builds, and follow its + directions. Make sure you get the proper bittedness of build and Python 2.7 + version. #. Install latest :term:`setuptools` distribution into the Python you obtained/installed/found in the step above: download `ez_setup.py @@ -392,8 +395,11 @@ Windows Using Python 3 `_ for your system and which is supported by Pyramid. -#. Download and install the `Python for Windows extensions (for Python 3.x) `_. - Carefully read the README.txt file at the end of the list of builds, and follow its directions. Make sure you get the proper bittedness of build and Python 3.x version. +#. Download and install the `Python for Windows extensions (for Python 3.x) + `_. Carefully read + the README.txt file at the end of the list of builds, and follow its + directions. Make sure you get the proper bittedness of build and Python 3.x + version. #. Install latest :term:`distribute` distribution into the Python you obtained/installed/found in the step above: download `distribute_setup.py -- cgit v1.2.3 From bb0f9b899a45aaa347bf7be3c55bfa78edfeec61 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 15 Aug 2013 23:17:07 -0700 Subject: merge changes from kusut PR#1085 and stevepiercy PR#1084 wrap to 79 columns remove duplicate link of Windows extensions at top of file to prevent early clickage --- docs/narr/install.rst | 369 +++++++++++++++++++------------------------------- 1 file changed, 141 insertions(+), 228 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 54109e70f..e3dc1da2a 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -9,49 +9,50 @@ Installing :app:`Pyramid` Before You Install ------------------ -You will need `Python `_ version 2.6 or better to -run :app:`Pyramid`. +You will need `Python `_ version 2.6 or better to run +:app:`Pyramid`. .. sidebar:: Python Versions - 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. + 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 -Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is -also known to run on :term:`PyPy` (1.9+). +:app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, +Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run +on :term:`PyPy` (1.9+). -:app:`Pyramid` installation does not require the compilation of any -C code, so you need only a Python interpreter that meets the -requirements mentioned. +:app:`Pyramid` installation does not require the compilation of any C code, so +you need only a Python interpreter that meets the requirements mentioned. For Mac OS X Users ~~~~~~~~~~~~~~~~~~ From `Python.org `_: - Python comes pre-installed on Mac OS X, but due to Apple's release - cycle, it's often one or even two years old. The overwhelming - recommendation of the "MacPython" community is to upgrade your - Python by downloading and installing a newer version from - `the Python standard release page `_. + Python comes pre-installed on Mac OS X, but due to Apple's release cycle, + it's often one or even two years old. The overwhelming recommendation of + the "MacPython" community is to upgrade your Python by downloading and + installing a newer version from `the Python standard release page + `_. -It is recommended to download one of the *installer* versions, unless you prefer to install your Python through a packgage manager (e.g., macports or homebrew) or to build your Python from source. +It is recommended to download one of the *installer* versions, unless you +prefer to install your Python through a packgage manager (e.g., macports or +homebrew) or to build your Python from source. -Unless you have a need for a specific earlier version, it is recommended -to install the latest 2.x or 3.x version of Python. +Unless you have a need for a specific earlier version, it is recommended to +install the latest 2.x or 3.x version of Python. -If you use an installer for your Python, then you can skip to the -section :ref:`installing_unix`. +If you use an installer for your Python, then you can skip to the section +:ref:`installing_unix`. If You Don't Yet Have A Python Interpreter (UNIX) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If your system doesn't have a Python interpreter, and you're on UNIX, -you can either install Python using your operating system's package -manager *or* you can install Python from source fairly easily on any -UNIX system that has development tools. +If your system doesn't have a Python interpreter, and you're on UNIX, you can +either install Python using your operating system's package manager *or* you +can install Python from source fairly easily on any UNIX system that has +development tools. .. index:: pair: install; Python (from package, UNIX) @@ -59,13 +60,12 @@ UNIX system that has development tools. Package Manager Method ++++++++++++++++++++++ -You can use your system's "package manager" to install Python. -Each package manager is slightly different, but the "flavor" of -them is usually the same. +You can use your system's "package manager" to install Python. Each package +manager is slightly different, but the "flavor" of them is usually the same. For example, on a Debian or Ubuntu system, use the following command: -.. code-block:: text +.. code-block:: bash $ sudo apt-get install python2.7-dev @@ -82,30 +82,29 @@ invokable via ``python2.7`` from a shell prompt. Source Compile Method +++++++++++++++++++++ -It's useful to use a Python interpreter that *isn't* the "system" -Python interpreter to develop your software. The authors of -:app:`Pyramid` tend not to use the system Python for development -purposes; always a self-compiled one. Compiling Python is usually -easy, and often the "system" Python is compiled with options that -aren't optimal for web development. For an explanation, see +It's useful to use a Python interpreter that *isn't* the "system" Python +interpreter to develop your software. The authors of :app:`Pyramid` tend not +to use the system Python for development purposes; always a self-compiled one. +Compiling Python is usually easy, and often the "system" Python is compiled +with options that aren't optimal for web development. For an explanation, see https://github.com/Pylons/pyramid/issues/747. -To compile software on your UNIX system, typically you need -development tools. Often these can be installed via the package -manager. For example, this works to do so on an Ubuntu Linux system: +To compile software on your UNIX system, typically you need development tools. +Often these can be installed via the package manager. For example, this works +to do so on an Ubuntu Linux system: -.. code-block:: text +.. code-block:: bash $ sudo apt-get install build-essential -On Mac OS X, installing `XCode -`_ has much the same effect. +On Mac OS X, installing `XCode `_ has +much the same effect. -Once you've got development tools installed on your system, you can -install a Python 2.7 interpreter from *source*, on the same system, -using the following commands: +Once you've got development tools installed on your system, you can install a +Python 2.7 interpreter from *source*, on the same system, using the following +commands: -.. code-block:: text +.. code-block:: bash $ cd ~ $ mkdir tmp @@ -117,9 +116,8 @@ using the following commands: $ ./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 -prompt. +Once these steps are performed, the Python interpreter will be invokable via +``$HOME/opt/Python-2.7.3/bin/python`` from a shell prompt. .. index:: pair: install; Python (from package, Windows) @@ -127,24 +125,21 @@ prompt. If You Don't Yet Have A Python Interpreter (Windows) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If your Windows system doesn't have a Python interpreter, you'll need -to install it by downloading a Python 2.7-series interpreter -executable from `python.org's download section -`_ (the files labeled "Windows -Installer"). Once you've downloaded it, double click on the -executable and accept the defaults during the installation process. -You may also need to download and install the `Python for Windows -extensions `_. +If your Windows system doesn't have a Python interpreter, you'll need to +install it by downloading a Python 2.7-series interpreter executable from +`python.org's download section `_ (the files +labeled "Windows Installer"). Once you've downloaded it, double click on the +executable and accept the defaults during the installation process. You may +also need to download and install the Python for Windows extensions. .. warning:: - After you install Python on Windows, you may need to add the - ``C:\Python27`` directory to your environment's ``Path`` in order - to make it possible to invoke Python from a command prompt by - typing ``python``. To do so, right click ``My Computer``, select - ``Properties`` --> ``Advanced Tab`` --> ``Environment Variables`` - and add that directory to the end of the ``Path`` environment - variable. + After you install Python on Windows, you may need to add the ``C:\Python27`` + directory to your environment's ``Path`` in order to make it possible to + invoke Python from a command prompt by typing ``python``. To do so, right + click ``My Computer``, select ``Properties`` --> ``Advanced Tab`` --> + ``Environment Variables`` and add that directory to the end of the ``Path`` + environment variable. .. index:: single: installing on UNIX @@ -154,91 +149,63 @@ extensions `_. Installing :app:`Pyramid` on a UNIX System --------------------------------------------- -It is best practice to install :app:`Pyramid` into a "virtual" -Python environment in order to obtain isolation from any "system" -packages you've got installed in your Python version. This can be -done by using the :term:`virtualenv` package. Using a virtualenv will -also prevent :app:`Pyramid` from globally installing versions of -packages that are not compatible with your system Python. +It is best practice to install :app:`Pyramid` into a "virtual" Python +environment in order to obtain isolation from any "system" packages you've got +installed in your Python version. This can be done by using the +:term:`virtualenv` package. Using a virtualenv will also prevent +:app:`Pyramid` from globally installing versions of packages that are not +compatible with your system Python. To set up a virtualenv in which to install :app:`Pyramid`, first ensure that -:term:`setuptools` or :term:`distribute` is installed. To do so, invoke -``import setuptools`` within the Python interpreter you'd like to run -:app:`Pyramid` under. +:term:`setuptools` is installed. To do so, invoke ``import setuptools`` within +the Python interpreter you'd like to run :app:`Pyramid` under. -The following command will not display anything if setuptools or distribute is -already installed: +The following command will not display anything if setuptools is already +installed: -.. code-block:: text +.. code-block:: bash $ python2.7 -c 'import setuptools' -Running the same command will yield the following output if setuptools or -distribute is not yet installed: +Running the same command will yield the following output if setuptools is not +yet installed: -.. code-block:: text +.. code-block:: bash Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -will need to install setuptools or distribute manually. +will need to install setuptools manually. If you are using a "system" Python (one installed by your OS distributor or a -3rd-party packager such as Fink or MacPorts), you can usually install the -setuptools or distribute package by using your system's package manager. If -you cannot do this, or if you're using a self-installed version of Python, -you will need to install setuptools or distribute "by hand". Installing -setuptools or distribute "by hand" is always a reasonable thing to do, even -if your package manager already has a pre-chewed version of setuptools for -installation. +third-party packager such as Fink or MacPorts), you can usually install the +setuptools package by using your system's package manager. If you cannot do +this, or if you're using a self-installed version of Python, you will need to +install setuptools "by hand". Installing setuptools "by hand" is always a +reasonable thing to do, even if your package manager already has a pre-chewed +version of setuptools for installation. -If you're using Python 2, you'll want to install ``setuptools``. If you're -using Python 3, you'll want to install ``distribute``. Below we tell you how -to do both. - -Installing Setuptools On Python 2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Installing Setuptools +~~~~~~~~~~~~~~~~~~~~~ To install setuptools by hand under Python 2, first download `ez_setup.py -`_ then invoke it using the -Python interpreter into which you want to install setuptools. +`_ then invoke +it using the Python interpreter into which you want to install setuptools. -.. code-block:: text +.. code-block:: bash $ python ez_setup.py -Once this command is invoked, setuptools should be installed on your -system. If the command fails due to permission errors, you may need -to be the administrative user on your system to successfully invoke -the script. To remediate this, you may need to do: - -.. code-block:: text - - $ sudo python ez_setup.py - -Installing Distribute On Python 3 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``setuptools`` doesn't work under Python 3. Instead, you can use -``distribute``, which is a fork of setuptools. To -install it, first download `distribute_setup.py -`_ then invoke it using the -Python interpreter into which you want to install setuptools. - -.. code-block:: text - - $ python3 distribute_setup.py - -Once this command is invoked, distribute should be installed on your system. +Once this command is invoked, setuptools should be installed on your system. If the command fails due to permission errors, you may need to be the administrative user on your system to successfully invoke the script. To remediate this, you may need to do: -.. code-block:: text +.. code-block:: bash - $ sudo python3 distribute_setup.py + $ sudo python ez_setup.py .. index:: pair: install; virtualenv @@ -246,9 +213,9 @@ remediate this, you may need to do: Installing the ``virtualenv`` Package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once you've got setuptools or distribute installed, you should install the -:term:`virtualenv` package. To install the :term:`virtualenv` package into -your setuptools-enabled Python interpreter, use the ``easy_install`` command. +Once you've got setuptools installed, you should install the :term:`virtualenv` +package. To install the :term:`virtualenv` package into your +setuptools-enabled Python interpreter, use the ``easy_install`` command. .. warning:: @@ -261,18 +228,18 @@ your setuptools-enabled Python interpreter, use the ``easy_install`` command. Turing-complete. If you insist on using ``pyvenv``, you'll need to understand how to install - software such as ``distribute`` into the virtual environment manually, - which this guide does not cover. + software such as ``setuptools`` into the virtual environment manually, which + this guide does not cover. -.. code-block:: text +.. code-block:: bash $ easy_install virtualenv This command should succeed, and tell you that the virtualenv package is now -installed. If it fails due to permission errors, you may need to install it -as your system's administrative user. For example: +installed. If it fails due to permission errors, you may need to install it as +your system's administrative user. For example: -.. code-block:: text +.. code-block:: bash $ sudo easy_install virtualenv @@ -286,41 +253,40 @@ Creating the Virtual Python Environment 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 +.. code-block:: bash $ 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. +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 - virtualenv is *very important*. This flag provides the necessary - isolation for running the set of packages required by - :app:`Pyramid`. If you do not specify ``--no-site-packages``, - it's possible that :app:`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. + 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 :app:`Pyramid`. If you do not specify + ``--no-site-packages``, it's possible that :app:`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. .. warning:: *do not* use ``sudo`` to run the - ``virtualenv`` script. It's perfectly acceptable (and desirable) - to create a virtualenv as a normal user. + ``virtualenv`` script. It's perfectly acceptable (and desirable) to create + a virtualenv as a normal user. Installing :app:`Pyramid` Into the Virtual Python Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -After you've got your virtualenv installed, you may install -:app:`Pyramid` itself using the following commands: +After you've got your virtualenv installed, you may install :app:`Pyramid` +itself using the following commands: -.. code-block:: text +.. code-block:: bash $ $VENV/bin/easy_install pyramid @@ -335,109 +301,56 @@ complete, as it downloads and installs a number of dependencies. Installing :app:`Pyramid` on a Windows System ------------------------------------------------- -You can use Pyramid on Windows under Python 2 or under Python 3. Directions -for both versions are included below. - -Windows Using Python 2 -~~~~~~~~~~~~~~~~~~~~~~ +You can use Pyramid on Windows under Python 2 or 3. -#. Download and install the most recent `Python 2.7.x version +#. Download and install the most recent `Python 2.7.x or 3.3.x version `_ for your system. -#. Download and install the `Python for Windows extensions (for Python 2.7) +#. Download and install the `Python for Windows extensions `_. Carefully read the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper bittedness of build and Python 2.7 + directions. Make sure you get the proper "bittedness" of build and Python version. -#. Install latest :term:`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.7 installation using a - command prompt: +#. Install latest :term:`setuptools` distribution into the Python from step 1 + above: download `ez_setup.py + `_ and run + it using the ``python`` interpreter of your Python 2.7 or 3.3 installation + using a command prompt: - .. code-block:: text + .. code-block:: bash + # modify the command according to the python version, e.g.: + # for Python 2.7: c:\> c:\Python27\python ez_setup.py + # for Python 3.3: + c:\> c:\Python33\python ez_setup.py #. Install `virtualenv`: - .. code-block:: text - - c:\> c:\Python27\Scripts\easy_install virtualenv - -#. Make a :term:`virtualenv` workspace: - - .. code-block:: text - - c:\> set VENV=c:\env - c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% - - 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 ``%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 - installed: - - .. code-block:: text - - c:\env> %VENV%\Scripts\easy_install pyramid - -Windows Using Python 3 -~~~~~~~~~~~~~~~~~~~~~~ - -#. Download and install the latest version of `Python 3.x - `_ for your system and which is - supported by Pyramid. - -#. Download and install the `Python for Windows extensions (for Python 3.x) - `_. Carefully read - the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper bittedness of build and Python 3.x - version. - -#. Install latest :term:`distribute` distribution into the Python you - obtained/installed/found in the step above: download `distribute_setup.py - `_ and run it using the - ``python`` interpreter of your Python 3.x installation using a command - prompt: - - .. code-block:: text + .. code-block:: bash # modify the command according to the python version, e.g.: - # for Python 3.2.x: - c:\> c:\Python32\python distribute_setup.py - # for Python 3.3.x: - c:\> c:\Python33\python distribute_setup.py - -#. Install :term:`virtualenv`: - - .. code-block:: text - - # for Python 3.2.x: - c:\> c:\Python32\Scripts\easy_install virtualenv - # for Python 3.3.x: + # for Python 2.7: + c:\> c:\Python27\Scripts\easy_install virtualenv + # for Python 3.3: c:\> c:\Python33\Scripts\easy_install virtualenv #. Make a :term:`virtualenv` workspace: - .. code-block:: text + .. code-block:: bash c:\> set VENV=c:\env - # for Python 3.2.x: - c:\> c:\Python32\Scripts\virtualenv --no-site-packages %VENV% - # for Python 3.3.x: + # modify the command according to the python version, e.g.: + # for Python 2.7: + c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% + # for Python 3.3: c:\> c:\Python33\Scripts\virtualenv --no-site-packages %VENV% - 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. + 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 ``%VENV%\Scripts\activate.bat`` to make your shell environment wired to use the virtualenv. @@ -445,7 +358,7 @@ Windows Using Python 3 #. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies installed: - .. code-block:: text + .. code-block:: bash c:\env> %VENV%\Scripts\easy_install pyramid -- cgit v1.2.3 From ca25863d5100535e1b91117b3487b1b3a03e2522 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 15 Aug 2013 23:30:04 -0700 Subject: undoing bash highlighting to just text. bash prepends a $ which makes copy/paste of commands annoying, and for Windows with \ in the path, it is an escape character and does weird colorization. --- docs/narr/install.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e3dc1da2a..7f549e824 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -65,7 +65,7 @@ manager is slightly different, but the "flavor" of them is usually the same. For example, on a Debian or Ubuntu system, use the following command: -.. code-block:: bash +.. code-block:: text $ sudo apt-get install python2.7-dev @@ -93,7 +93,7 @@ To compile software on your UNIX system, typically you need development tools. Often these can be installed via the package manager. For example, this works to do so on an Ubuntu Linux system: -.. code-block:: bash +.. code-block:: text $ sudo apt-get install build-essential @@ -104,7 +104,7 @@ Once you've got development tools installed on your system, you can install a Python 2.7 interpreter from *source*, on the same system, using the following commands: -.. code-block:: bash +.. code-block:: text $ cd ~ $ mkdir tmp @@ -163,14 +163,14 @@ the Python interpreter you'd like to run :app:`Pyramid` under. The following command will not display anything if setuptools is already installed: -.. code-block:: bash +.. code-block:: text $ python2.7 -c 'import setuptools' Running the same command will yield the following output if setuptools is not yet installed: -.. code-block:: bash +.. code-block:: text Traceback (most recent call last): File "", line 1, in @@ -194,7 +194,7 @@ To install setuptools by hand under Python 2, first download `ez_setup.py `_ then invoke it using the Python interpreter into which you want to install setuptools. -.. code-block:: bash +.. code-block:: text $ python ez_setup.py @@ -203,7 +203,7 @@ If the command fails due to permission errors, you may need to be the administrative user on your system to successfully invoke the script. To remediate this, you may need to do: -.. code-block:: bash +.. code-block:: text $ sudo python ez_setup.py @@ -231,7 +231,7 @@ setuptools-enabled Python interpreter, use the ``easy_install`` command. software such as ``setuptools`` into the virtual environment manually, which this guide does not cover. -.. code-block:: bash +.. code-block:: text $ easy_install virtualenv @@ -239,7 +239,7 @@ This command should succeed, and tell you that the virtualenv package is now installed. If it fails due to permission errors, you may need to install it as your system's administrative user. For example: -.. code-block:: bash +.. code-block:: text $ sudo easy_install virtualenv @@ -253,7 +253,7 @@ Creating the Virtual Python Environment 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:: bash +.. code-block:: text $ export VENV=~/env $ virtualenv --no-site-packages $VENV @@ -286,7 +286,7 @@ Installing :app:`Pyramid` Into the Virtual Python Environment After you've got your virtualenv installed, you may install :app:`Pyramid` itself using the following commands: -.. code-block:: bash +.. code-block:: text $ $VENV/bin/easy_install pyramid @@ -318,7 +318,7 @@ You can use Pyramid on Windows under Python 2 or 3. it using the ``python`` interpreter of your Python 2.7 or 3.3 installation using a command prompt: - .. code-block:: bash + .. code-block:: text # modify the command according to the python version, e.g.: # for Python 2.7: @@ -328,7 +328,7 @@ You can use Pyramid on Windows under Python 2 or 3. #. Install `virtualenv`: - .. code-block:: bash + .. code-block:: text # modify the command according to the python version, e.g.: # for Python 2.7: @@ -338,7 +338,7 @@ You can use Pyramid on Windows under Python 2 or 3. #. Make a :term:`virtualenv` workspace: - .. code-block:: bash + .. code-block:: text c:\> set VENV=c:\env # modify the command according to the python version, e.g.: @@ -358,7 +358,7 @@ You can use Pyramid on Windows under Python 2 or 3. #. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies installed: - .. code-block:: bash + .. code-block:: text c:\env> %VENV%\Scripts\easy_install pyramid -- cgit v1.2.3 From 65c60a85f90f7bf8f97848e7314b6d0e9ecc5599 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 16 Aug 2013 00:48:12 -0700 Subject: restore earlier fixes on latexindex don't make up funny words and use explicit 32- or 64-bit phrase --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 7f549e824..15e9e8699 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -309,7 +309,7 @@ You can use Pyramid on Windows under Python 2 or 3. #. Download and install the `Python for Windows extensions `_. Carefully read the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper "bittedness" of build and Python + directions. Make sure you get the proper 32- or 64-bit build and Python version. #. Install latest :term:`setuptools` distribution into the Python from step 1 -- cgit v1.2.3 From 2ded59ba248156d92e0f5a8e6c991af93b38384c Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 16 Aug 2013 01:26:05 -0700 Subject: remove --no-site-packages and add usage note --- docs/narr/install.rst | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 15e9e8699..d193cbab3 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -256,7 +256,7 @@ you can then create a virtual environment. To do so, invoke the following: .. code-block:: text $ export VENV=~/env - $ virtualenv --no-site-packages $VENV + $ virtualenv $VENV New python executable in /home/foo/env/bin/python Installing setuptools.............done. @@ -267,17 +267,14 @@ it's an absolute path. .. warning:: - 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 :app:`Pyramid`. If you do not specify - ``--no-site-packages``, it's possible that :app:`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. + ``--no-site-packages`` is now the default for virtualenv and can be + omitted. Do not override the default and use ``--system-site-packages`` + unless you know what you are doing. -.. warning:: *do not* use ``sudo`` to run the - ``virtualenv`` script. It's perfectly acceptable (and desirable) to create - a virtualenv as a normal user. +.. warning:: + + *do not* use ``sudo`` to run the ``virtualenv`` script. It's perfectly + acceptable (and desirable) to create a virtualenv as a normal user. Installing :app:`Pyramid` Into the Virtual Python Environment @@ -343,9 +340,9 @@ You can use Pyramid on Windows under Python 2 or 3. c:\> set VENV=c:\env # modify the command according to the python version, e.g.: # for Python 2.7: - c:\> c:\Python27\Scripts\virtualenv --no-site-packages %VENV% + c:\> c:\Python27\Scripts\virtualenv %VENV% # for Python 3.3: - c:\> c:\Python33\Scripts\virtualenv --no-site-packages %VENV% + c:\> c:\Python33\Scripts\virtualenv %VENV% 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, -- cgit v1.2.3 From b189a3ed0f44544687e68d0287417c42cd0fdca3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 16 Aug 2013 01:51:59 -0700 Subject: Another crack at the note for venv options --- docs/narr/install.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index d193cbab3..fb67b899b 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -267,9 +267,11 @@ it's an absolute path. .. warning:: - ``--no-site-packages`` is now the default for virtualenv and can be - omitted. Do not override the default and use ``--system-site-packages`` - unless you know what you are doing. + Avoid using the ``--system-site-packages`` option when creating the + virtualenv unless you know what you are doing. For versions of virtualenv + prior to 1.7, make sure to use the ``--no-site-packages`` option, because + this option was formerly not the default and may produce undesirable + results. .. warning:: -- cgit v1.2.3 From 08bf6fa20e9593c14f5870f392cf7d01665f52f8 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Fri, 27 Sep 2013 23:52:20 -0600 Subject: Add note about C extensions There was some confusion regarding the output of easy_install pyramid when the Python header files were not installed, these errors are harmless however adding a simple note would have stopped a lot of frustration. --- docs/narr/install.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index fb67b899b..6260c36f2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -25,6 +25,10 @@ on :term:`PyPy` (1.9+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the requirements mentioned. +Certain :app:`Pyramid` dependencies can optionally use C Python extensions, +if a compiler or Python headers are unavailable the dependency will fall back +to using pure Python instead. + For Mac OS X Users ~~~~~~~~~~~~~~~~~~ @@ -292,6 +296,13 @@ itself using the following commands: The ``easy_install`` command will take longer than the previous ones to complete, as it downloads and installs a number of dependencies. +.. note:: + + If you see any errors related to failing to compile the C extensions, you + may safely ignore those errors. If you wish to use the C extensions, please + verify that you have a functioning compiler and the Python header files + installed. + .. index:: single: installing on Windows -- cgit v1.2.3 From 994261c9104c174624fb7655508acad453023a5b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 28 Sep 2013 01:23:43 -0500 Subject: minor tweaks to language --- docs/narr/install.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 6260c36f2..f3f736df6 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -25,9 +25,9 @@ on :term:`PyPy` (1.9+). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the requirements mentioned. -Certain :app:`Pyramid` dependencies can optionally use C Python extensions, -if a compiler or Python headers are unavailable the dependency will fall back -to using pure Python instead. +Some :app:`Pyramid` dependencies may attempt to build C extensions for +performance speedups. If a compiler or Python headers are unavailable the +dependency will fall back to using pure Python instead. For Mac OS X Users ~~~~~~~~~~~~~~~~~~ @@ -298,10 +298,10 @@ complete, as it downloads and installs a number of dependencies. .. note:: - If you see any errors related to failing to compile the C extensions, you - may safely ignore those errors. If you wish to use the C extensions, please - verify that you have a functioning compiler and the Python header files - installed. + If you see any warnings and/or errors related to failing to compile the C + extensions, in most cases you may safely ignore those errors. If you wish + to use the C extensions, please verify that you have a functioning compiler + and the Python header files installed. .. index:: single: installing on Windows -- cgit v1.2.3 From 2323103debf8487d0a0a1ec27580e502d46989e3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 28 Sep 2013 02:19:27 -0700 Subject: Add versioning to branch master --- docs/narr/install.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index f3f736df6..e419a8b20 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -289,9 +289,9 @@ Installing :app:`Pyramid` Into the Virtual Python Environment After you've got your virtualenv installed, you may install :app:`Pyramid` itself using the following commands: -.. code-block:: text - - $ $VENV/bin/easy_install pyramid +.. parsed-literal:: + + $ $VENV/bin/easy_install "pyramid==\ |release|\ " The ``easy_install`` command will take longer than the previous ones to complete, as it downloads and installs a number of dependencies. @@ -368,9 +368,9 @@ You can use Pyramid on Windows under Python 2 or 3. #. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies installed: - .. code-block:: text - - c:\env> %VENV%\Scripts\easy_install pyramid + .. parsed-literal:: + + c:\\env> %VENV%\\Scripts\\easy_install "pyramid==\ |release|\ " What Gets Installed ------------------- -- cgit v1.2.3 From f0398e9e32d8fee1b0f46eef0ffcc814d7e6efb0 Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 14:46:11 -0400 Subject: Update python installation instructions for mac osx. --- docs/narr/install.rst | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e419a8b20..89791115f 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -32,20 +32,32 @@ dependency will fall back to using pure Python instead. For Mac OS X Users ~~~~~~~~~~~~~~~~~~ -From `Python.org `_: +Python comes pre-installed on Mac OS X, but due to Apple's release cycle, +it is often out of date. Unless you have a need for a specific earlier version, it is recommended to +install the latest 2.x or 3.x version of Python. - Python comes pre-installed on Mac OS X, but due to Apple's release cycle, - it's often one or even two years old. The overwhelming recommendation of - the "MacPython" community is to upgrade your Python by downloading and - installing a newer version from `the Python standard release page - `_. +You can install the latest version of Python for Mac using the `homebrew `_ package manager. -It is recommended to download one of the *installer* versions, unless you -prefer to install your Python through a packgage manager (e.g., macports or -homebrew) or to build your Python from source. +To install homebrew: -Unless you have a need for a specific earlier version, it is recommended to -install the latest 2.x or 3.x version of Python. +.. code-block:: text + + $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" + +Then update the homebrew package index. + +.. code-block:: text + + $ brew update & brew doctor + +If the message says you're ready to brew, install the latest python2 or python3 using: + +.. code-block:: text + + $ brew install python + $ brew install python3 + +Alternatively, you can install it via the binaries on the `python.org `_ site. If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. -- cgit v1.2.3 From 836894d87eb2b1127b69f7eed70b770460f913ca Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:07:23 -0400 Subject: Update the documentation for Python installation on OSX. Binaries are primary method. --- docs/narr/install.rst | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 89791115f..c0f633686 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -33,32 +33,19 @@ For Mac OS X Users ~~~~~~~~~~~~~~~~~~ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, -it is often out of date. Unless you have a need for a specific earlier version, it is recommended to -install the latest 2.x or 3.x version of Python. +it is often out of date. Unless you have a need for a specific earlier version, +it is recommended to install the latest 2.x or 3.x version of Python. -You can install the latest version of Python for Mac using the `homebrew `_ package manager. +You can install the latest verion of Python for OSX from the binaries on +`python.org `_. -To install homebrew: - -.. code-block:: text - - $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" - -Then update the homebrew package index. - -.. code-block:: text - - $ brew update & brew doctor - -If the message says you're ready to brew, install the latest python2 or python3 using: +Alternatively, you can use the `homebrew `_ package manager. .. code-block:: text $ brew install python $ brew install python3 -Alternatively, you can install it via the binaries on the `python.org `_ site. - If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. -- cgit v1.2.3 From 8af14089b511723912063bb1b8f1471378d4a0ba Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:20:04 -0400 Subject: Change OSX to Mac OS X --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c0f633686..54984e6a2 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -36,7 +36,7 @@ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it is often out of date. Unless you have a need for a specific earlier version, it is recommended to install the latest 2.x or 3.x version of Python. -You can install the latest verion of Python for OSX from the binaries on +You can install the latest verion of Python for Mac OS X from the binaries on `python.org `_. Alternatively, you can use the `homebrew `_ package manager. -- cgit v1.2.3 From abab3574569d39eeea5459eaad102eb6c7b2d7ef Mon Sep 17 00:00:00 2001 From: Nina Zakharenko Date: Mon, 14 Apr 2014 16:44:32 -0400 Subject: adding comments for python versions --- docs/narr/install.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 54984e6a2..4ccf65c65 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -43,7 +43,10 @@ Alternatively, you can use the `homebrew `_ package manager. .. code-block:: text + # for python 2.7 $ brew install python + + # for python 3.4 $ brew install python3 If you use an installer for your Python, then you can skip to the section -- cgit v1.2.3 From a51a5627b0dda868f467588c464215d6f74a0958 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 14 Apr 2014 16:46:59 -0400 Subject: clarify python version support --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index e419a8b20..a6ae7df60 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -15,8 +15,8 @@ You will need `Python `_ version 2.6 or better to run .. sidebar:: Python Versions 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. + 2.7, Python 3.2, Python 3.3, Python 3.4 and PyPy 2.2. :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 Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -- cgit v1.2.3 From 109792709bf90eddf85eaaed1743b5cbb1faa34e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 May 2015 16:12:35 -0700 Subject: cherrypick from 1.5 --- docs/narr/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a825b61b9..0f114a9c7 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -33,11 +33,11 @@ For Mac OS X Users ~~~~~~~~~~~~~~~~~~ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, -it is often out of date. Unless you have a need for a specific earlier version, -it is recommended to install the latest 2.x or 3.x version of Python. +it is often out of date. Unless you have a need for a specific earlier +version, it is recommended to install the latest 2.x or 3.x version of Python. You can install the latest verion of Python for Mac OS X from the binaries on -`python.org `_. +`python.org `_. Alternatively, you can use the `homebrew `_ package manager. -- cgit v1.2.3 From 6ce54f44141811c20869a6850a0d68997093b281 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 7 Oct 2015 23:51:52 -0700 Subject: Heading rst syntax, casing --- docs/narr/install.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 0f114a9c7..3cd7b5a14 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -1,7 +1,7 @@ .. _installing_chapter: Installing :app:`Pyramid` -============================ +========================= .. index:: single: install preparation @@ -52,7 +52,7 @@ Alternatively, you can use the `homebrew `_ package manager. If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. -If You Don't Yet Have A Python Interpreter (UNIX) +If You Don't Yet Have a Python Interpreter (UNIX) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If your system doesn't have a Python interpreter, and you're on UNIX, you can @@ -128,7 +128,7 @@ Once these steps are performed, the Python interpreter will be invokable via .. index:: pair: install; Python (from package, Windows) -If You Don't Yet Have A Python Interpreter (Windows) +If You Don't Yet Have a Python Interpreter (Windows) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If your Windows system doesn't have a Python interpreter, you'll need to @@ -153,7 +153,7 @@ also need to download and install the Python for Windows extensions. .. _installing_unix: Installing :app:`Pyramid` on a UNIX System ---------------------------------------------- +------------------------------------------ It is best practice to install :app:`Pyramid` into a "virtual" Python environment in order to obtain isolation from any "system" packages you've got @@ -285,8 +285,8 @@ it's an absolute path. acceptable (and desirable) to create a virtualenv as a normal user. -Installing :app:`Pyramid` Into the Virtual Python Environment -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Installing :app:`Pyramid` into the Virtual Python Environment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ After you've got your virtualenv installed, you may install :app:`Pyramid` itself using the following commands: @@ -311,7 +311,7 @@ complete, as it downloads and installs a number of dependencies. .. _installing_windows: Installing :app:`Pyramid` on a Windows System -------------------------------------------------- +--------------------------------------------- You can use Pyramid on Windows under Python 2 or 3. -- cgit v1.2.3 From 1cbf35a01d1a11d4519071766754c274e26bb533 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 8 Oct 2015 00:09:36 -0700 Subject: rewrapping only --- docs/narr/install.rst | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 3cd7b5a14..a81a559a7 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -32,9 +32,9 @@ dependency will fall back to using pure Python instead. For Mac OS X Users ~~~~~~~~~~~~~~~~~~ -Python comes pre-installed on Mac OS X, but due to Apple's release cycle, -it is often out of date. Unless you have a need for a specific earlier -version, it is recommended to install the latest 2.x or 3.x version of Python. +Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it is +often out of date. Unless you have a need for a specific earlier version, it is +recommended to install the latest 2.x or 3.x version of Python. You can install the latest verion of Python for Mac OS X from the binaries on `python.org `_. @@ -90,12 +90,12 @@ Source Compile Method It's useful to use a Python interpreter that *isn't* the "system" Python interpreter to develop your software. The authors of :app:`Pyramid` tend not -to use the system Python for development purposes; always a self-compiled one. +to use the system Python for development purposes; always a self-compiled one. Compiling Python is usually easy, and often the "system" Python is compiled with options that aren't optimal for web development. For an explanation, see https://github.com/Pylons/pyramid/issues/747. -To compile software on your UNIX system, typically you need development tools. +To compile software on your UNIX system, typically you need development tools. Often these can be installed via the package manager. For example, this works to do so on an Ubuntu Linux system: @@ -204,7 +204,7 @@ it using the Python interpreter into which you want to install setuptools. $ python ez_setup.py -Once this command is invoked, setuptools should be installed on your system. +Once this command is invoked, setuptools should be installed on your system. If the command fails due to permission errors, you may need to be the administrative user on your system to successfully invoke the script. To remediate this, you may need to do: @@ -301,9 +301,9 @@ complete, as it downloads and installs a number of dependencies. .. note:: If you see any warnings and/or errors related to failing to compile the C - extensions, in most cases you may safely ignore those errors. If you wish - to use the C extensions, please verify that you have a functioning compiler - and the Python header files installed. + extensions, in most cases you may safely ignore those errors. If you wish to + use the C extensions, please verify that you have a functioning compiler and + the Python header files installed. .. index:: single: installing on Windows @@ -382,4 +382,3 @@ WebOb, PasteDeploy, and others are installed. Additionally, as chronicled in :ref:`project_narr`, scaffolds will be registered, which make it easy to start a new :app:`Pyramid` project. - -- cgit v1.2.3 From e812341cfc68849395a77685e65272e39cf40ecc Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 8 Oct 2015 01:33:01 -0700 Subject: update tested versions in sidebar --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a81a559a7..26d458727 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -15,8 +15,8 @@ You will need `Python `_ version 2.6 or better to run .. sidebar:: Python Versions As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python - 2.7, Python 3.2, Python 3.3, Python 3.4 and PyPy 2.2. :app:`Pyramid` does - not run under any version of Python before 2.6. + 2.7, Python 3.2, Python 3.3, Python 3.4, PyPy, and PyPy3. :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 Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -- cgit v1.2.3 From 1f7305442e2aa824af4223df6b844cc988034492 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 13 Jan 2016 09:22:50 -0800 Subject: add python 3.5 --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 26d458727..164442262 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -15,8 +15,8 @@ You will need `Python `_ version 2.6 or better to run .. sidebar:: Python Versions As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python - 2.7, Python 3.2, Python 3.3, Python 3.4, PyPy, and PyPy3. :app:`Pyramid` - does not run under any version of Python before 2.6. + 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, PyPy, and PyPy3. + :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 Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -- cgit v1.2.3 From 384007c4e6e1c0c397b9c643c8c34bdf0ddf4b07 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 13 Jan 2016 13:24:26 -0800 Subject: update for python 3.5 --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 164442262..381e325df 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -46,7 +46,7 @@ Alternatively, you can use the `homebrew `_ package manager. # for python 2.7 $ brew install python - # for python 3.4 + # for python 3.5 $ brew install python3 If you use an installer for your Python, then you can skip to the section -- cgit v1.2.3 From 4064028cadc63ed1aceb14e6c88827b88b12f839 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 20 Jan 2016 00:38:09 -0800 Subject: Update docs to reflect dropping Python 3.2 support --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 381e325df..c4e3e2c5f 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -15,8 +15,8 @@ You will need `Python `_ version 2.6 or better to run .. sidebar:: Python Versions As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python - 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, PyPy, and PyPy3. - :app:`Pyramid` does not run under any version of Python before 2.6. + 2.7, Python 3.3, Python 3.4, Python 3.5, PyPy, and PyPy3. :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 Linux, Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -- cgit v1.2.3 From 65bb52bafa5d44b378f01dfb47816a952bf93a66 Mon Sep 17 00:00:00 2001 From: Svintsov Dmitry Date: Sun, 24 Jan 2016 16:36:43 +0500 Subject: fix indent in docs --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c4e3e2c5f..767b16fc0 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -292,7 +292,7 @@ After you've got your virtualenv installed, you may install :app:`Pyramid` itself using the following commands: .. parsed-literal:: - + $ $VENV/bin/easy_install "pyramid==\ |release|\ " The ``easy_install`` command will take longer than the previous ones to @@ -371,7 +371,7 @@ You can use Pyramid on Windows under Python 2 or 3. installed: .. parsed-literal:: - + c:\\env> %VENV%\\Scripts\\easy_install "pyramid==\ |release|\ " What Gets Installed -- cgit v1.2.3 From 44bbbc32b607b043e708a625c4b1756db8919bdd Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 3 Apr 2016 02:17:59 -0700 Subject: - replace easy_install with pip - bump Python version to 3.5 or generalize to Python 3 - rewrite seealso's - use ps1con lexer for windows powershell console - add hyperlink targets --- docs/narr/install.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 767b16fc0..4a2f228a3 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -29,6 +29,9 @@ Some :app:`Pyramid` dependencies may attempt to build C extensions for performance speedups. If a compiler or Python headers are unavailable the dependency will fall back to using pure Python instead. + +.. _for-mac-os-x-users: + For Mac OS X Users ~~~~~~~~~~~~~~~~~~ @@ -52,6 +55,9 @@ Alternatively, you can use the `homebrew `_ package manager. If you use an installer for your Python, then you can skip to the section :ref:`installing_unix`. + +.. _if-you-don-t-yet-have-a-python-interpreter-unix: + If You Don't Yet Have a Python Interpreter (UNIX) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From ec1bbffae07cd8b573ba007b367b9eec2902a364 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 10 Apr 2016 16:08:38 -0700 Subject: - update installation.rst to use pip, pyvenv, Python 3.4 - simplify installation.rst by removing not-Pyramid things (installing Python and requirements for installing packages) while providing official external references - update cross-reference in quick_tutorial requirements.rst - add glossary entry for pyvenv --- docs/narr/install.rst | 367 +++++++++++++------------------------------------- 1 file changed, 97 insertions(+), 270 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 4a2f228a3..5e2abb236 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -3,14 +3,21 @@ Installing :app:`Pyramid` ========================= +.. note:: + + This installation guide now emphasizes the use of Python 3.4 and greater + for simplicity. + + .. index:: single: install preparation -Before You Install ------------------- +Before You Install Pyramid +-------------------------- -You will need `Python `_ version 2.6 or better to run -:app:`Pyramid`. +Install Python version 3.4 or greater for your operating system, and satisfy +the :ref:`requirements-for-installing-packages`, as described in +the following sections. .. sidebar:: Python Versions @@ -19,15 +26,21 @@ You will need `Python `_ version 2.6 or better to run 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 Linux, -Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run -on :term:`PyPy` (1.9+). +Mac OS X, and FreeBSD, as well as on Windows platforms. It is also known to +run on :term:`PyPy` (1.9+). -:app:`Pyramid` installation does not require the compilation of any C code, so -you need only a Python interpreter that meets the requirements mentioned. +:app:`Pyramid` installation does not require the compilation of any C code. +However, some :app:`Pyramid` dependencies may attempt to build binary +extensions from C code for performance speed ups. If a compiler or Python +headers are unavailable, the dependency will fall back to using pure Python +instead. -Some :app:`Pyramid` dependencies may attempt to build C extensions for -performance speedups. If a compiler or Python headers are unavailable the -dependency will fall back to using pure Python instead. +.. note:: + + If you see any warnings or errors related to failing to compile the binary + extensions, in most cases you may safely ignore those errors. If you wish to + use the binary extensions, please verify that you have a functioning + compiler and the Python header files installed for your operating system. .. _for-mac-os-x-users: @@ -37,7 +50,7 @@ For Mac OS X Users Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it is often out of date. Unless you have a need for a specific earlier version, it is -recommended to install the latest 2.x or 3.x version of Python. +recommended to install the latest 3.x version of Python. You can install the latest verion of Python for Mac OS X from the binaries on `python.org `_. @@ -46,10 +59,7 @@ Alternatively, you can use the `homebrew `_ package manager. .. code-block:: text - # for python 2.7 - $ brew install python - - # for python 3.5 + # for python 3.x $ brew install python3 If you use an installer for your Python, then you can skip to the section @@ -66,250 +76,101 @@ either install Python using your operating system's package manager *or* you can install Python from source fairly easily on any UNIX system that has development tools. -.. index:: - pair: install; Python (from package, UNIX) - -Package Manager Method -++++++++++++++++++++++ - -You can use your system's "package manager" to install Python. Each package -manager is slightly different, but the "flavor" of them is usually the same. - -For example, on a Debian or Ubuntu system, use the following command: - -.. code-block:: text - - $ sudo apt-get install python2.7-dev - -This command will install both the Python interpreter and its development -header files. Note that the headers are required by some (optional) C -extensions in software depended upon by Pyramid, not by Pyramid itself. - -Once these steps are performed, the Python interpreter will usually be -invokable via ``python2.7`` from a shell prompt. - -.. index:: - pair: install; Python (from source, UNIX) - -Source Compile Method -+++++++++++++++++++++ - -It's useful to use a Python interpreter that *isn't* the "system" Python -interpreter to develop your software. The authors of :app:`Pyramid` tend not -to use the system Python for development purposes; always a self-compiled one. -Compiling Python is usually easy, and often the "system" Python is compiled -with options that aren't optimal for web development. For an explanation, see -https://github.com/Pylons/pyramid/issues/747. - -To compile software on your UNIX system, typically you need development tools. -Often these can be installed via the package manager. For example, this works -to do so on an Ubuntu Linux system: - -.. code-block:: text - - $ sudo apt-get install build-essential +.. seealso:: See the official Python documentation :ref:`Using Python on Unix + platforms ` for full details. -On Mac OS X, installing `XCode `_ has -much the same effect. - -Once you've got development tools installed on your system, you can install a -Python 2.7 interpreter from *source*, on the same system, using the following -commands: - -.. code-block:: text - - $ 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 prompt. .. index:: pair: install; Python (from package, Windows) +.. _if-you-don-t-yet-have-a-python-interpreter-windows: + If You Don't Yet Have a Python Interpreter (Windows) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If your Windows system doesn't have a Python interpreter, you'll need to -install it by downloading a Python 2.7-series interpreter executable from +install it by downloading a Python 3.x-series interpreter executable from `python.org's download section `_ (the files labeled "Windows Installer"). Once you've downloaded it, double click on the executable and accept the defaults during the installation process. You may also need to download and install the Python for Windows extensions. -.. warning:: - - After you install Python on Windows, you may need to add the ``C:\Python27`` - directory to your environment's ``Path`` in order to make it possible to - invoke Python from a command prompt by typing ``python``. To do so, right - click ``My Computer``, select ``Properties`` --> ``Advanced Tab`` --> - ``Environment Variables`` and add that directory to the end of the ``Path`` - environment variable. - -.. index:: - single: installing on UNIX - -.. _installing_unix: - -Installing :app:`Pyramid` on a UNIX System ------------------------------------------- - -It is best practice to install :app:`Pyramid` into a "virtual" Python -environment in order to obtain isolation from any "system" packages you've got -installed in your Python version. This can be done by using the -:term:`virtualenv` package. Using a virtualenv will also prevent -:app:`Pyramid` from globally installing versions of packages that are not -compatible with your system Python. - -To set up a virtualenv in which to install :app:`Pyramid`, first ensure that -:term:`setuptools` is installed. To do so, invoke ``import setuptools`` within -the Python interpreter you'd like to run :app:`Pyramid` under. - -The following command will not display anything if setuptools is already -installed: - -.. code-block:: text - - $ python2.7 -c 'import setuptools' - -Running the same command will yield the following output if setuptools is not -yet installed: - -.. code-block:: text +.. seealso:: See the official Python documentation :ref:`Using Python on + Windows ` for full details. - Traceback (most recent call last): - File "", line 1, in - ImportError: No module named setuptools - -If ``import setuptools`` raises an :exc:`ImportError` as it does above, you -will need to install setuptools manually. - -If you are using a "system" Python (one installed by your OS distributor or a -third-party packager such as Fink or MacPorts), you can usually install the -setuptools package by using your system's package manager. If you cannot do -this, or if you're using a self-installed version of Python, you will need to -install setuptools "by hand". Installing setuptools "by hand" is always a -reasonable thing to do, even if your package manager already has a pre-chewed -version of setuptools for installation. - -Installing Setuptools -~~~~~~~~~~~~~~~~~~~~~ - -To install setuptools by hand under Python 2, first download `ez_setup.py -`_ then invoke -it using the Python interpreter into which you want to install setuptools. - -.. code-block:: text +.. seealso:: Download and install the `Python for Windows extensions + `_. Carefully read + the README.txt file at the end of the list of builds, and follow its + directions. Make sure you get the proper 32- or 64-bit build and Python + version. - $ python ez_setup.py +.. warning:: -Once this command is invoked, setuptools should be installed on your system. -If the command fails due to permission errors, you may need to be the -administrative user on your system to successfully invoke the script. To -remediate this, you may need to do: + After you install Python on Windows, you may need to add the ``C:\Python3x`` + directory to your environment's ``Path``, where ``x`` is the minor version + of installed Python, in order to make it possible to invoke Python from a + command prompt by typing ``python``. To do so, right click ``My Computer``, + select ``Properties`` --> ``Advanced Tab`` --> ``Environment Variables`` and + add that directory to the end of the ``Path`` environment variable. -.. code-block:: text + .. seealso:: See `Configuring Python (on Windows) + `_ for + full details. - $ sudo python ez_setup.py .. index:: - pair: install; virtualenv + single: requirements for installing packages -Installing the ``virtualenv`` Package -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _requirements-for-installing-packages: -Once you've got setuptools installed, you should install the :term:`virtualenv` -package. To install the :term:`virtualenv` package into your -setuptools-enabled Python interpreter, use the ``easy_install`` command. +Requirements for Installing Packages +------------------------------------ -.. warning:: +Use :term:`pip` for installing packages and :term:`pyvenv` for creating a +virtual environment. A virtual environment is a semi-isolated Python +environment that allows packages to be installed for use by a particular +application, rather than being installed system wide. - Python 3.3 includes ``pyvenv`` out of the box, which provides similar - functionality to ``virtualenv``. We however suggest using ``virtualenv`` - instead, which works well with Python 3.3. This isn't a recommendation made - for technical reasons; it's made because it's not feasible for the authors - of this guide to explain setup using multiple virtual environment systems. - We are aiming to not need to make the installation documentation - Turing-complete. +.. seealso:: See the Python Packaging Authority's (PyPA) documention + `Requirements for Installing Packages + `_ + for full details. - If you insist on using ``pyvenv``, you'll need to understand how to install - software such as ``setuptools`` into the virtual environment manually, which - this guide does not cover. - -.. code-block:: text - - $ easy_install virtualenv - -This command should succeed, and tell you that the virtualenv package is now -installed. If it fails due to permission errors, you may need to install it as -your system's administrative user. For example: - -.. code-block:: text - - $ sudo easy_install virtualenv .. index:: - single: virtualenv - pair: Python; virtual environment - -Creating the Virtual Python Environment -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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 - - $ export VENV=~/env - $ virtualenv $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. + single: installing on UNIX + single: installing on Mac OS X -.. warning:: +.. _installing_unix: - Avoid using the ``--system-site-packages`` option when creating the - virtualenv unless you know what you are doing. For versions of virtualenv - prior to 1.7, make sure to use the ``--no-site-packages`` option, because - this option was formerly not the default and may produce undesirable - results. +Installing :app:`Pyramid` on a UNIX System +------------------------------------------ -.. warning:: +After installing Python as described previously in :ref:`for-mac-os-x-users` or +:ref:`if-you-don-t-yet-have-a-python-interpreter-unix`, and satisfying the +:ref:`requirements-for-installing-packages`, you can now install Pyramid. - *do not* use ``sudo`` to run the ``virtualenv`` script. It's perfectly - acceptable (and desirable) to create a virtualenv as a normal user. +#. Make a :term:`virtualenv` workspace: + .. code-block:: bash -Installing :app:`Pyramid` into the Virtual Python Environment -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + $ export VENV=~/env + $ pyvenv $VENV -After you've got your virtualenv installed, you may install :app:`Pyramid` -itself using the following commands: + You can either follow the use of the environment variable ``$VENV``, or + replace it with the root directory of the virtual environment. If you choose + the former approach, ensure that ``$VENV`` is an absolute path. In the + latter case, the ``export`` command can be skipped. -.. parsed-literal:: +#. (Optional) Consider using ``$VENV/bin/activate`` to make your shell + environment wired to use the virtual environment. - $ $VENV/bin/easy_install "pyramid==\ |release|\ " +#. Use ``pip`` to get :app:`Pyramid` and its direct dependencies installed: -The ``easy_install`` command will take longer than the previous ones to -complete, as it downloads and installs a number of dependencies. + .. parsed-literal:: -.. note:: + $ $VENV/bin/pip install "pyramid==\ |release|\ " - If you see any warnings and/or errors related to failing to compile the C - extensions, in most cases you may safely ignore those errors. If you wish to - use the C extensions, please verify that you have a functioning compiler and - the Python header files installed. .. index:: single: installing on Windows @@ -319,72 +180,38 @@ complete, as it downloads and installs a number of dependencies. Installing :app:`Pyramid` on a Windows System --------------------------------------------- -You can use Pyramid on Windows under Python 2 or 3. - -#. Download and install the most recent `Python 2.7.x or 3.3.x version - `_ for your system. - -#. Download and install the `Python for Windows extensions - `_. Carefully read - the README.txt file at the end of the list of builds, and follow its - directions. Make sure you get the proper 32- or 64-bit build and Python - version. - -#. Install latest :term:`setuptools` distribution into the Python from step 1 - above: download `ez_setup.py - `_ and run - it using the ``python`` interpreter of your Python 2.7 or 3.3 installation - using a command prompt: - - .. code-block:: text - - # modify the command according to the python version, e.g.: - # for Python 2.7: - c:\> c:\Python27\python ez_setup.py - # for Python 3.3: - c:\> c:\Python33\python ez_setup.py - -#. Install `virtualenv`: - - .. code-block:: text - - # modify the command according to the python version, e.g.: - # for Python 2.7: - c:\> c:\Python27\Scripts\easy_install virtualenv - # for Python 3.3: - c:\> c:\Python33\Scripts\easy_install virtualenv +After installing Python as described previously in +:ref:`if-you-don-t-yet-have-a-python-interpreter-windows`, and satisfying the +:ref:`requirements-for-installing-packages`, you can now install Pyramid. #. Make a :term:`virtualenv` workspace: - .. code-block:: text + .. code-block:: ps1con c:\> set VENV=c:\env - # modify the command according to the python version, e.g.: - # for Python 2.7: - c:\> c:\Python27\Scripts\virtualenv %VENV% - # for Python 3.3: - c:\> c:\Python33\Scripts\virtualenv %VENV% + # replace "x" with your minor version of Python 3 + c:\> c:\Python3x\Scripts\pyvenv %VENV% - 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. + You can either follow the use of the environment variable ``%VENV%``, or + replace it with the root directory of the virtual environment. If you choose + the former approach, ensure that ``%VENV%`` is an absolute path. In the + latter case, the ``set`` command can be skipped. #. (Optional) Consider using ``%VENV%\Scripts\activate.bat`` to make your shell - environment wired to use the virtualenv. + environment wired to use the virtual environment. -#. Use ``easy_install`` to get :app:`Pyramid` and its direct dependencies - installed: +#. Use ``pip`` to get :app:`Pyramid` and its direct dependencies installed: .. parsed-literal:: - c:\\env> %VENV%\\Scripts\\easy_install "pyramid==\ |release|\ " + c:\\env> %VENV%\\Scripts\\pip install "pyramid==\ |release|\ " + What Gets Installed ------------------- -When you ``easy_install`` :app:`Pyramid`, various other libraries such as -WebOb, PasteDeploy, and others are installed. +When you install :app:`Pyramid`, various libraries such as WebOb, PasteDeploy, +and others are installed. Additionally, as chronicled in :ref:`project_narr`, scaffolds will be registered, which make it easy to start a new :app:`Pyramid` project. -- cgit v1.2.3 From 74cf44544cb2c6dbd4a0ae7b01881ab450194f53 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 12 Apr 2016 02:16:47 -0700 Subject: - removed "now" per https://github.com/Pylons/pyramid/pull/2468#discussion_r59310317 --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 5e2abb236..febdc87cc 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -5,8 +5,8 @@ Installing :app:`Pyramid` .. note:: - This installation guide now emphasizes the use of Python 3.4 and greater - for simplicity. + This installation guide emphasizes the use of Python 3.4 and greater for + simplicity. .. index:: -- cgit v1.2.3 From d603697517d56a1e2f2a5707ebba922db24f5c71 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 12 Apr 2016 02:47:57 -0700 Subject: - replace `pyvenv` with `python3 -m venv` --- docs/narr/install.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index febdc87cc..548d040f1 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -126,8 +126,8 @@ also need to download and install the Python for Windows extensions. Requirements for Installing Packages ------------------------------------ -Use :term:`pip` for installing packages and :term:`pyvenv` for creating a -virtual environment. A virtual environment is a semi-isolated Python +Use :term:`pip` for installing packages and ``python3 -m venv env`` for +creating a virtual environment. A virtual environment is a semi-isolated Python environment that allows packages to be installed for use by a particular application, rather than being installed system wide. @@ -155,7 +155,7 @@ After installing Python as described previously in :ref:`for-mac-os-x-users` or .. code-block:: bash $ export VENV=~/env - $ pyvenv $VENV + $ python3 -m venv $VENV You can either follow the use of the environment variable ``$VENV``, or replace it with the root directory of the virtual environment. If you choose @@ -190,7 +190,7 @@ After installing Python as described previously in c:\> set VENV=c:\env # replace "x" with your minor version of Python 3 - c:\> c:\Python3x\Scripts\pyvenv %VENV% + c:\> c:\Python3x\Scripts\python3 -m venv %VENV% You can either follow the use of the environment variable ``%VENV%``, or replace it with the root directory of the virtual environment. If you choose -- cgit v1.2.3 From d67566acebf890a603fad0e9069d5e131dfb5b31 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 12 Apr 2016 06:43:38 -0700 Subject: one does not simply "create a virtualenv". one should "create a virtual environment". - Fixes #2483 --- docs/narr/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 548d040f1..7cd47d681 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -150,7 +150,7 @@ After installing Python as described previously in :ref:`for-mac-os-x-users` or :ref:`if-you-don-t-yet-have-a-python-interpreter-unix`, and satisfying the :ref:`requirements-for-installing-packages`, you can now install Pyramid. -#. Make a :term:`virtualenv` workspace: +#. Make a :term:`virtual environment` workspace: .. code-block:: bash @@ -184,7 +184,7 @@ After installing Python as described previously in :ref:`if-you-don-t-yet-have-a-python-interpreter-windows`, and satisfying the :ref:`requirements-for-installing-packages`, you can now install Pyramid. -#. Make a :term:`virtualenv` workspace: +#. Make a :term:`virtual environment` workspace: .. code-block:: ps1con -- cgit v1.2.3 From a4f54c5a7adbee3f37a98498ed41039621c9e549 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 10 Apr 2016 20:55:13 -0600 Subject: Replace Python 2.6 with 2.7 --- docs/narr/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 7cd47d681..c767ed95a 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -21,9 +21,9 @@ the following sections. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python - 2.7, Python 3.3, Python 3.4, Python 3.5, PyPy, and PyPy3. :app:`Pyramid` - does not run under any version of Python before 2.6. + As of this writing, :app:`Pyramid` has been tested under Python 2.7, + Python 3.3, Python 3.4, Python 3.5, PyPy, and PyPy3. :app:`Pyramid` does + not run under any version of Python before 2.7. :app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, Mac OS X, and FreeBSD, as well as on Windows platforms. It is also known to -- cgit v1.2.3 From a651b357b17746281b429baf5ad9d93edb333072 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 Apr 2016 14:27:59 -0700 Subject: replace ps1con with doscon for lexer --- docs/narr/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/install.rst') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index c767ed95a..3e5523262 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -186,7 +186,7 @@ After installing Python as described previously in #. Make a :term:`virtual environment` workspace: - .. code-block:: ps1con + .. code-block:: doscon c:\> set VENV=c:\env # replace "x" with your minor version of Python 3 -- cgit v1.2.3