* Re: [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv
2016-06-01 16:35 [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv brian avery
@ 2016-06-01 16:27 ` Brian Avery
2016-06-02 10:34 ` Barros Pena, Belen
2016-06-01 16:35 ` [PATCH 1/1] toaster-manual: Switch to pip3 dependency installer brian avery
1 sibling, 1 reply; 5+ messages in thread
From: Brian Avery @ 2016-06-01 16:27 UTC (permalink / raw)
To: toaster; +Cc: brian avery
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
I've attached a pdf version for easier reading.
-bavery (an intel employee)
On Wed, Jun 1, 2016 at 9:35 AM, brian avery <avery.brian@gmail.com> wrote:
> Our switch to python3 requires us to dump the virtualenv approach
> as long as we need python to resolve to python2 in the same shell
> that python3 resolves to python3. To enable users to install
> Toaster's python package dependencies locally, we are
> changing to using pip3 and these doc changes explain how to do
> that.
>
> -bavery (an intel employee)
>
> The following changes since commit 3c42280b8a5cac184311a59589849fec4e215a14:
>
> sanity: Drop setting C locale (2016-06-01 15:05:47 +0100)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib bavery/toaster/pip3-doc-changes
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/pip3-doc-changes
>
> brian avery (1):
> toaster-manual: Switch to pip3 dependency installer
>
> .../toaster-manual-setup-and-use.xml | 26 ++++----
> .../toaster-manual/toaster-manual-start.xml | 72 ++++++----------------
> 2 files changed, 31 insertions(+), 67 deletions(-)
>
> --
> 1.9.1
[-- Attachment #2: toaster-manual3.pdf --]
[-- Type: application/pdf, Size: 840370 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv
@ 2016-06-01 16:35 brian avery
2016-06-01 16:27 ` Brian Avery
2016-06-01 16:35 ` [PATCH 1/1] toaster-manual: Switch to pip3 dependency installer brian avery
0 siblings, 2 replies; 5+ messages in thread
From: brian avery @ 2016-06-01 16:35 UTC (permalink / raw)
To: toaster; +Cc: brian avery
Our switch to python3 requires us to dump the virtualenv approach
as long as we need python to resolve to python2 in the same shell
that python3 resolves to python3. To enable users to install
Toaster's python package dependencies locally, we are
changing to using pip3 and these doc changes explain how to do
that.
-bavery (an intel employee)
The following changes since commit 3c42280b8a5cac184311a59589849fec4e215a14:
sanity: Drop setting C locale (2016-06-01 15:05:47 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib bavery/toaster/pip3-doc-changes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/pip3-doc-changes
brian avery (1):
toaster-manual: Switch to pip3 dependency installer
.../toaster-manual-setup-and-use.xml | 26 ++++----
.../toaster-manual/toaster-manual-start.xml | 72 ++++++----------------
2 files changed, 31 insertions(+), 67 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] toaster-manual: Switch to pip3 dependency installer
2016-06-01 16:35 [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv brian avery
2016-06-01 16:27 ` Brian Avery
@ 2016-06-01 16:35 ` brian avery
1 sibling, 0 replies; 5+ messages in thread
From: brian avery @ 2016-06-01 16:35 UTC (permalink / raw)
To: toaster; +Cc: brian avery
Our switch to python3 requires us to dump the virtualenv approach
as long as we need python to resolve to python2 in the same shell
that python3 resolves to python3. To enable users to install
Toaster's python package dependencies locally, we are
changing to using pip3 and these doc changes explain how to do
that.
Signed-off-by: brian avery <brian.avery@intel.com>
---
.../toaster-manual-setup-and-use.xml | 26 ++++----
.../toaster-manual/toaster-manual-start.xml | 72 ++++++----------------
2 files changed, 31 insertions(+), 67 deletions(-)
diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/documentation/toaster-manual/toaster-manual-setup-and-use.xml
index 963b211..6abbcb7 100644
--- a/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ b/documentation/toaster-manual/toaster-manual-setup-and-use.xml
@@ -116,12 +116,12 @@
create a superuser by following these steps:
<orderedlist>
<listitem><para>
- If you used <filename>virtualenv</filename>, which is
+ If you used <filename>pip3</filename>, which is
recommended, to set up the Toaster system dependencies,
- you need be sure the virtual environment is activated.
- To activate this environment, use the following command:
+ you need be sure the local user path is in your PATH list.
+ To append the pip3 local user path, use the following command:
<literallayout class='monospaced'>
- $ source venv/bin/activate
+ $ export PATH=$PATH:$HOME/.local/bin
</literallayout>
</para></listitem>
<listitem><para>
@@ -213,14 +213,14 @@
<listitem><para>
If you are using Ubuntu 14.04.3, run the following:
<literallayout class='monospaced'>
- $ sudo apt-get install apache2 libapache2-mod-wsgi mysql-server virtualenv libmysqlclient-dev
+ $ sudo apt-get install apache2 libapache2-mod-wsgi mysql-server python3-pip libmysqlclient-dev
</literallayout>
</para></listitem>
<listitem><para>
If you are using Fedora 22 or a RedHat distribution, run
the following:
<literallayout class='monospaced'>
- $ sudo dnf install httpd mod_wsgi python-virtualenv gcc mysql-devel
+ $ sudo dnf install httpd mod_wsgi gcc mysql-devel
</literallayout>
</para></listitem>
</itemizedlist>
@@ -245,17 +245,15 @@
</literallayout>
</para></listitem>
<listitem><para>
- Initialize a virtual environment and install Toaster
- dependencies.
- Using a virtual environment keeps the Python packages
+ Install Toaster
+ dependencies using the --user flag which
+ keeps the Python packages
isolated from your system-provided packages:
<literallayout class='monospaced'>
$ cd /var/www/toaster/
- $ virtualenv venv
- $ source ./venv/bin/activate
- $ pip install -r ./poky/bitbake/toaster-requirements.txt
- $ pip install mysql
- $ pip install MySQL-python
+ $ pip3 install --user -r ./poky/bitbake/toaster-requirements.txt
+ $ pip3 install --user mysql
+ $ pip3 install --user MySQL-python
</literallayout>
<note>
Isolating these packages is not required but is
diff --git a/documentation/toaster-manual/toaster-manual-start.xml b/documentation/toaster-manual/toaster-manual-start.xml
index daefa79..71f9151 100644
--- a/documentation/toaster-manual/toaster-manual-start.xml
+++ b/documentation/toaster-manual/toaster-manual-start.xml
@@ -22,6 +22,11 @@
and
"<ulink url='&YOCTO_DOCS_QS_URL;#releases'>Yocto Project Release</ulink>"
sections in the Yocto Project Quick Start.
+ For Ubuntu/Debian you may need to do an additional install of pip3.
+ <literallayout class='monospaced'>
+ $ sudo apt-get install python3-pip
+ </literallayout>
+
</para>
</section>
@@ -42,56 +47,6 @@
install-compatible format.
</para>
- <section id='toaster-virtual-environment'>
- <title>Set Up a Python Virtual Environment</title>
-
- <para>
- Set up a Python virtual environment that allows you
- to maintain a dedicated Python executable and its own
- set of installed modules.
- Doing so separates the executable from Python and the
- modules provided by the operating system.
- This separation avoids any version conflicts.
- <note>
- Creating a virtual environment is not absolutely
- necessary.
- However, doing so is highly recommended.
- </note>
- </para>
-
- <para>
- Follow these steps to set up your virtual environment.
- These steps assume a Ubuntu distribution:
- <orderedlist>
- <listitem><para><emphasis>Install <filename>virtualenv</filename>:</emphasis>
- Install the supported
- <filename>python-virtualenv</filename> package from your
- distribution rather than using <filename>pip</filename>.
- <literallayout class='monospaced'>
- $ sudo apt-get install python-virtualenv
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Create and Activate a Virtual Environment:</emphasis>
- <literallayout class='monospaced'>
- $ virtualenv venv
- $ source venv/bin/activate
- </literallayout>
- </para></listitem>
- </orderedlist>
- <note>
- After setting up a virtual environment in
- which to run Toaster, you must initialize that
- virtual environment each time you want to start
- Toaster.
- Use the following to initialize the environment just
- before you start Toaster:
- <literallayout class='monospaced'>
- $ source venv/bin/activate
- </literallayout>
- </note>
- </para>
- </section>
-
<section id='toaster-load-packages'>
<title>Install Toaster Packages</title>
@@ -99,9 +54,20 @@
You need to install the packages that Toaster requires.
Use this command:
<literallayout class='monospaced'>
- $ pip install -r bitbake/toaster-requirements.txt
+ $ pip3 install --user -r bitbake/toaster-requirements.txt
</literallayout>
</para>
+ <para>
+ This will install the necessary Toaster modules into a local python 3 cache in your $HOME directory. The caches is actually located in $HOME/.local To see what packages have been installed into your $HOME direcotry you can do:
+ <literallayout class='monospaced'>
+ $ pip3 list installed --local
+ </literallayout>
+And, if you need to remove something the following will work:
+ <literallayout class='monospaced'>
+ $ pip3 uninstall PackageNameToUninstall
+ </literallayout>
+ </para>
+
</section>
<!-- Commenting this section out for now in case it needs to be used again.
@@ -120,7 +86,7 @@
install <filename>daemon</filename> using the
following command:
<literallayout class='monospaced'>
- $ sudo apt-get install daemon
+ $ sudo apt-get install daemon
</literallayout>
</para></listitem>
<listitem><para><emphasis>Non-Debian-Based Systems:</emphasis>
@@ -137,7 +103,7 @@
Here are the commands for a 32-bit distribution:
<literallayout class='monospaced'>
$ wget http://libslack.org/daemon/download/daemon-0.6.4-1.i686.rpm
- $ sudo rpm -i daemon-0.6.4-1.i686.rpm
+ $ sudo rpm -i daemon-0.6.4-1.i686.rpm
</literallayout>
</para></listitem>
</itemizedlist>
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv
2016-06-01 16:27 ` Brian Avery
@ 2016-06-02 10:34 ` Barros Pena, Belen
2016-06-02 14:46 ` Barros Pena, Belen
0 siblings, 1 reply; 5+ messages in thread
From: Barros Pena, Belen @ 2016-06-02 10:34 UTC (permalink / raw)
To: Brian Avery, toaster@yoctoproject.org; +Cc: Avery, Brian
On 01/06/2016 17:27, "toaster-bounces@yoctoproject.org on behalf of Brian
Avery" <toaster-bounces@yoctoproject.org on behalf of
avery.brian@gmail.com> wrote:
>I've attached a pdf version for easier reading.
So the instructions look good to me. I installed python3-pip in my Ubuntu
14.04 system, and then the Toaster dependencies using
pip3 install --user -r bitbake/toaster-requirements.txt
I can see all of them installed if I do
pip3 list installed --local
But, when I try to start Toaster, it complains saying
This program needs Django>1.8,<1.9
Please install with pip install -r
/home/belen/toaster-python3/bitbake/toaster-requirements.txt
Any ideas about what I am doing wrong?
Thanks!
Belén
>
>-bavery (an intel employee)
>
>On Wed, Jun 1, 2016 at 9:35 AM, brian avery <avery.brian@gmail.com> wrote:
>> Our switch to python3 requires us to dump the virtualenv approach
>> as long as we need python to resolve to python2 in the same shell
>> that python3 resolves to python3. To enable users to install
>> Toaster's python package dependencies locally, we are
>> changing to using pip3 and these doc changes explain how to do
>> that.
>>
>> -bavery (an intel employee)
>>
>> The following changes since commit
>>3c42280b8a5cac184311a59589849fec4e215a14:
>>
>> sanity: Drop setting C locale (2016-06-01 15:05:47 +0100)
>>
>> are available in the git repository at:
>>
>> git://git.yoctoproject.org/poky-contrib
>>bavery/toaster/pip3-doc-changes
>>
>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/p
>>ip3-doc-changes
>>
>> brian avery (1):
>> toaster-manual: Switch to pip3 dependency installer
>>
>> .../toaster-manual-setup-and-use.xml | 26 ++++----
>> .../toaster-manual/toaster-manual-start.xml | 72
>>++++++----------------
>> 2 files changed, 31 insertions(+), 67 deletions(-)
>>
>> --
>> 1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv
2016-06-02 10:34 ` Barros Pena, Belen
@ 2016-06-02 14:46 ` Barros Pena, Belen
0 siblings, 0 replies; 5+ messages in thread
From: Barros Pena, Belen @ 2016-06-02 14:46 UTC (permalink / raw)
To: Barros Pena, Belen, Brian Avery, toaster@yoctoproject.org; +Cc: Avery, Brian
On 02/06/2016 11:34, "toaster-bounces@yoctoproject.org on behalf of Barros
Pena, Belen" <toaster-bounces@yoctoproject.org on behalf of
belen.barros.pena@intel.com> wrote:
>
>
>On 01/06/2016 17:27, "toaster-bounces@yoctoproject.org on behalf of Brian
>Avery" <toaster-bounces@yoctoproject.org on behalf of
>avery.brian@gmail.com> wrote:
>
>>I've attached a pdf version for easier reading.
>
>So the instructions look good to me. I installed python3-pip in my Ubuntu
>14.04 system, and then the Toaster dependencies using
>
>pip3 install --user -r bitbake/toaster-requirements.txt
>
>I can see all of them installed if I do
>
>pip3 list installed --local
>
>But, when I try to start Toaster, it complains saying
>
>This program needs Django>1.8,<1.9
>Please install with pip install -r
>/home/belen/toaster-python3/bitbake/toaster-requirements.txt
>
>Any ideas about what I am doing wrong?
>
>Thanks!
>
>Belén
You can ignore the above: a clean terminal solved all my problems.
Sorry for the noise.
Belén
>
>
>
>
>
>
>
>>
>>-bavery (an intel employee)
>>
>>On Wed, Jun 1, 2016 at 9:35 AM, brian avery <avery.brian@gmail.com>
>>wrote:
>>> Our switch to python3 requires us to dump the virtualenv approach
>>> as long as we need python to resolve to python2 in the same shell
>>> that python3 resolves to python3. To enable users to install
>>> Toaster's python package dependencies locally, we are
>>> changing to using pip3 and these doc changes explain how to do
>>> that.
>>>
>>> -bavery (an intel employee)
>>>
>>> The following changes since commit
>>>3c42280b8a5cac184311a59589849fec4e215a14:
>>>
>>> sanity: Drop setting C locale (2016-06-01 15:05:47 +0100)
>>>
>>> are available in the git repository at:
>>>
>>> git://git.yoctoproject.org/poky-contrib
>>>bavery/toaster/pip3-doc-changes
>>>
>>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/
>>>p
>>>ip3-doc-changes
>>>
>>> brian avery (1):
>>> toaster-manual: Switch to pip3 dependency installer
>>>
>>> .../toaster-manual-setup-and-use.xml | 26 ++++----
>>> .../toaster-manual/toaster-manual-start.xml | 72
>>>++++++----------------
>>> 2 files changed, 31 insertions(+), 67 deletions(-)
>>>
>>> --
>>> 1.9.1
>
>--
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-02 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 16:35 [PATCH 0/1] toaster: Documentation chanes to move to pip3 from virtualenv brian avery
2016-06-01 16:27 ` Brian Avery
2016-06-02 10:34 ` Barros Pena, Belen
2016-06-02 14:46 ` Barros Pena, Belen
2016-06-01 16:35 ` [PATCH 1/1] toaster-manual: Switch to pip3 dependency installer brian avery
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.